mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 05:52:05 +00:00
This is a step towards #5958. While it's not actually necessary to add these functions (since people could just use getFile() . "/resources/whatever.yml" instead), this helps preserve the convention of using the `resources` folder, which might be helpful for external tools. As an example: stream_get_contents($this->getResource("lang/eng.ini")); (which is actually incorrect, since it leaks a resource) can now be replaced by file_get_contents($this->getResourcePath("lang/eng.ini")); quite trivially. getResourceFolder() can be used with scandir() to enumerate resources instead of using getResources(), although getResources() still provides utility in the relativized resource paths.