{"comment":{"url":"https://api.github.com/repos/pathikrit/better-files/comments/13303010","html_url":"https://github.com/pathikrit/better-files/commit/346b9825f953c13f7d277c82008e9264183fc6d7#commitcomment-13303010","id":13303010,"user":{"login":"pathikrit","id":899219,"avatar_url":"https://avatars.githubusercontent.com/u/899219?v=3","gravatar_id":"","url":"https://api.github.com/users/pathikrit","html_url":"https://github.com/pathikrit","followers_url":"https://api.github.com/users/pathikrit/followers","following_url":"https://api.github.com/users/pathikrit/following{/other_user}","gists_url":"https://api.github.com/users/pathikrit/gists{/gist_id}","starred_url":"https://api.github.com/users/pathikrit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pathikrit/subscriptions","organizations_url":"https://api.github.com/users/pathikrit/orgs","repos_url":"https://api.github.com/users/pathikrit/repos","events_url":"https://api.github.com/users/pathikrit/events{/privacy}","received_events_url":"https://api.github.com/users/pathikrit/received_events","type":"User","site_admin":false},"position":6,"line":25,"path":"src/main/scala/better/files/package.scala","commit_id":"346b9825f953c13f7d277c82008e9264183fc6d7","created_at":"2015-09-18T05:05:03Z","updated_at":"2015-09-18T05:05:03Z","body":"@retronym : I know way too much about NIO after the past week than I would like to admit. `File.newDirectoryStream` is surprising for simple listing purposes. What it does is essentially `listRecursively` and not only its own children which is what I would expect from `file.list`. Also, even if I put a depth param and use `File.walk(this, maxDepth = 1)` to list direct children, it includes its own path too unlike the legacy `java.io.File` one e.g. listing an empty directory using NIO returns 1 element instead of 0. So, this is one of the few places in this library, I actually use the least surprising legacy `java.io.File#list`.\r\n\r\nBut, back to the original point. If I want to include an unsurprising `def list: Iterator[File]` to BetterFile (and assume people know/don't know that is `String[] list` in `java.io.File`), I have to essentially either make BetterFile not be automatic implicit from java-File (which is how it is presently) OR call the Scala list something else (e.g. `listFiles`)."}}