Merge pull request #62 from mxcl/sort-ls

ls() is sorted; Fixes #58
This commit is contained in:
Max Howell
2020-07-26 13:58:44 -04:00
committed by GitHub

View File

@@ -164,7 +164,7 @@ public extension Pathish {
if options != .a, path.basename().hasPrefix(".") { return nil } if options != .a, path.basename().hasPrefix(".") { return nil }
// ^^ we dont use the Foundation `skipHiddenFiles` because it considers weird things hidden and we are mirroring `ls` // ^^ we dont use the Foundation `skipHiddenFiles` because it considers weird things hidden and we are mirroring `ls`
return path return path
} }.sorted()
} }
/// Recursively find files under this path. If the path is a file, no files will be found. /// Recursively find files under this path. If the path is a file, no files will be found.