Skip to content

Commit

Permalink
Rename paths#list to paths#listDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Seggan committed Dec 28, 2023
1 parent d49c4df commit 1a77126
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/lang/std/paths.papyri
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Returns a boolean value indicating whether the given path is hidden.
@h3 { isSymlink(path: string): boolean }
Returns a boolean value indicating whether the given path is a symbolic link.

@h3 { list(path: string): list\[string\] }
@h3 { listDir(path: string): list\[string\] }
Returns a list of the files and directories in the given directory.

@h3 { move(from: string, to: string): null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ object PathLib : NativeLibrary("__path") {
lib["fileName"] = pathFunction { it.fileName.toString().metisValue() }
lib["root"] = pathFunction { it.root.toString().metisValue() }
lib["isAbsolute"] = pathFunction { it.isAbsolute.metisValue() }
lib["list"] = pathFunction { path ->
lib["listDir"] = pathFunction { path ->
val list = Value.List()
path.toFile().listFiles()?.forEach {
list.add(it.absolutePath.metisValue())
Expand Down

0 comments on commit 1a77126

Please sign in to comment.