{"action":"created","issue":{"url":"https://api.github.com/repos/kohana/cascading-filesystem/issues/5","labels_url":"https://api.github.com/repos/kohana/cascading-filesystem/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/kohana/cascading-filesystem/issues/5/comments","events_url":"https://api.github.com/repos/kohana/cascading-filesystem/issues/5/events","html_url":"https://github.com/kohana/cascading-filesystem/issues/5","id":55729048,"number":5,"title":"Filesystem/CascadingFilesystem","user":{"login":"WinterSilence","id":3521094,"avatar_url":"https://avatars.githubusercontent.com/u/3521094?v=3","gravatar_id":"","url":"https://api.github.com/users/WinterSilence","html_url":"https://github.com/WinterSilence","followers_url":"https://api.github.com/users/WinterSilence/followers","following_url":"https://api.github.com/users/WinterSilence/following{/other_user}","gists_url":"https://api.github.com/users/WinterSilence/gists{/gist_id}","starred_url":"https://api.github.com/users/WinterSilence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinterSilence/subscriptions","organizations_url":"https://api.github.com/users/WinterSilence/orgs","repos_url":"https://api.github.com/users/WinterSilence/repos","events_url":"https://api.github.com/users/WinterSilence/events{/privacy}","received_events_url":"https://api.github.com/users/WinterSilence/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-28T08:50:10Z","updated_at":"2015-01-28T10:16:45Z","closed_at":null,"body":"Fixes:\r\n1. Cache should not be mandatory - `__construct(array $base_paths, Cache $cache = null)`\r\n2. Need set setBasePaths and isHiddenFile as public\r\n3. Why listFiles not supported subdirectories? Old Kohana::list_files() more powerfull than this.\r\n4. \r\n~~~\r\n    public function isHiddenFile($filename)\r\n    {\r\n        return in_array($filename[0], ['.', '~']);\r\n    }\r\n~~~\r\n5. load: include better than require_once, because we can't catch fatal errors, we use it's not only for class files."},"comment":{"url":"https://api.github.com/repos/kohana/cascading-filesystem/issues/comments/71810589","html_url":"https://github.com/kohana/cascading-filesystem/issues/5#issuecomment-71810589","issue_url":"https://api.github.com/repos/kohana/cascading-filesystem/issues/5","id":71810589,"user":{"login":"WinterSilence","id":3521094,"avatar_url":"https://avatars.githubusercontent.com/u/3521094?v=3","gravatar_id":"","url":"https://api.github.com/users/WinterSilence","html_url":"https://github.com/WinterSilence","followers_url":"https://api.github.com/users/WinterSilence/followers","following_url":"https://api.github.com/users/WinterSilence/following{/other_user}","gists_url":"https://api.github.com/users/WinterSilence/gists{/gist_id}","starred_url":"https://api.github.com/users/WinterSilence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinterSilence/subscriptions","organizations_url":"https://api.github.com/users/WinterSilence/orgs","repos_url":"https://api.github.com/users/WinterSilence/repos","events_url":"https://api.github.com/users/WinterSilence/events{/privacy}","received_events_url":"https://api.github.com/users/WinterSilence/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T10:16:45Z","updated_at":"2015-01-28T10:16:45Z","body":"> You can pass an in-memory cache called ArrayCache() if you don't want persistent caching. The advantage of this is that the CascadingFilesystem class doesn't have to have lots of if ($cache !== null) checks.\r\n\r\nagree\r\n\r\n> As for isHiddenFile(), it is just a helper method to determine whether a filename (string) is considered to be a hidden file. I'm not sure it would be very useful to users.\r\n\r\nI do not understand why we need a separate method, why not write `if (! $hidden_files && in_array($filename[0], ['.', '~'])) {`\r\n\r\n> I changed it to not list sub directories because that's completely unnecessary and inefficient; if you want a sub directory's contents, then execute the function again.\r\n\r\nEasier to make a recursive method than every time a recursive call.\r\n\r\n> The load method only exists to make the tests easier to write, it's not really intended for use by users. The method Kohana::load() should still exist after the cascading filesystem is implemented anyway.\r\n\r\nNot a suitable place for the method"}}