@@ -17,7 +17,7 @@ import java.nio.file.attribute.BasicFileAttributes
1717object list extends Function1 [Path , IndexedSeq [Path ]] {
1818 def apply (src : Path , sort : Boolean = true ): IndexedSeq [Path ] = {
1919 val arr = stream(src).toArray[Path ]
20- if (sort) arr.sorted
20+ if (sort) arr.sorted.toIndexedSeq
2121 else arr
2222 }
2323 def apply (src : Path ): IndexedSeq [Path ] = apply(src, true ).toIndexedSeq
@@ -53,7 +53,7 @@ object list extends Function1[Path, IndexedSeq[Path]] {
5353 * saving time as compared to filtering them after the fact.
5454 *
5555 * By default, the paths are returned as a pre-order traversal: the enclosing
56- * folder is occurs first before any of it's contents. You can pass in `preOrder =
56+ * folder occurs first before any of its contents. You can pass in `preOrder =
5757 * false` to turn it into a post-order traversal, such that the enclosing folder
5858 * occurs last after all it's contents.
5959 *
@@ -76,12 +76,12 @@ object walk {
7676 * you want `preOrder` to be `true` so the folder gets
7777 * created first.
7878 *
79- * @param followLinks Whether or not to follow symlinks while walking; defaults
79+ * @param followLinks Whether to follow symlinks while walking; defaults
8080 * to false
8181 *
8282 * @param maxDepth The max depth of the tree you wish to walk; defaults to unlimited
8383 *
84- * @param includeTarget Whether or not to include the given path as part of the walk.
84+ * @param includeTarget Whether to include the given path as part of the walk.
8585 * If `true`, does not raise an error if the given path is a
8686 * simple file and not a folder
8787 */
@@ -109,12 +109,12 @@ object walk {
109109 * you want `preOrder` to be `true` so the folder gets
110110 * created first.
111111 *
112- * @param followLinks Whether or not to follow symlinks while walking; defaults
112+ * @param followLinks Whether to follow symlinks while walking; defaults
113113 * to false
114114 *
115115 * @param maxDepth The max depth of the tree you wish to walk; defaults to unlimited
116116 *
117- * @param includeTarget Whether or not to include the given path as part of the walk.
117+ * @param includeTarget Whether to include the given path as part of the walk.
118118 * If `true`, does not raise an error if the given path is a
119119 * simple file and not a folder
120120 */
@@ -145,12 +145,12 @@ object walk {
145145 * you want `preOrder` to be `true` so the folder gets
146146 * created first.
147147 *
148- * @param followLinks Whether or not to follow symlinks while walking; defaults
148+ * @param followLinks Whether to follow symlinks while walking; defaults
149149 * to false
150150 *
151151 * @param maxDepth The max depth of the tree you wish to walk; defaults to unlimited
152152 *
153- * @param includeTarget Whether or not to include the given path as part of the walk.
153+ * @param includeTarget Whether to include the given path as part of the walk.
154154 * If `true`, does not raise an error if the given path is a
155155 * simple file and not a folder
156156 */
@@ -179,12 +179,12 @@ object walk {
179179 * you want `preOrder` to be `true` so the folder gets
180180 * created first.
181181 *
182- * @param followLinks Whether or not to follow symlinks while walking; defaults
182+ * @param followLinks Whether to follow symlinks while walking; defaults
183183 * to false
184184 *
185185 * @param maxDepth The max depth of the tree you wish to walk; defaults to unlimited
186186 *
187- * @param includeTarget Whether or not to include the given path as part of the walk.
187+ * @param includeTarget Whether to include the given path as part of the walk.
188188 * If `true`, does not raise an error if the given path is a
189189 * simple file and not a folder
190190 */
@@ -228,7 +228,7 @@ object walk {
228228 // rather than relying on `walkFileTree`, because `walkFileTree`
229229 // does the unintuitive thing when the `path` being walked is a
230230 // symlink to a directory (it just returns the symlink path and
231- // does not walking )
231+ // does not walk )
232232 val ds = Files .newDirectoryStream(pathNIO)
233233 val iter = ds.iterator()
234234 try {
0 commit comments