You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/Module.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,3 +82,8 @@ Core IO primitives.
82
82
# Package kotlinx.io.files
83
83
84
84
Basic API for working with files.
85
+
86
+
#### Known issues
87
+
88
+
-[#312](https://github.com/Kotlin/kotlinx-io/issues/312) For `wasmWasi` target, directory listing ([kotlinx.io.files.FileSystem.list]) does not work with NodeJS runtime on Windows,
89
+
as `fd_readdir` function is [not implemented there](https://github.com/nodejs/node/blob/6f4d6011ea1b448cf21f5d363c44e4a4c56ca34c/deps/uvwasi/src/uvwasi.c#L19).
Copy file name to clipboardExpand all lines: core/common/src/files/FileSystem.kt
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,25 @@ public sealed interface FileSystem {
145
145
* @throws FileNotFoundException if there is no file or directory corresponding to the specified path.
146
146
*/
147
147
publicfunresolve(path:Path): Path
148
+
149
+
/**
150
+
* Returns paths corresponding to [directory]'s immediate children.
151
+
*
152
+
* There are no guarantees on children paths order within a returned collection.
153
+
*
154
+
* If path [directory] was an absolute path, a returned collection will also contain absolute paths.
155
+
* If it was a relative path, a returned collection will contain relative paths.
156
+
*
157
+
* *For `wasmWasi` target, function does not work with NodeJS runtime on Windows,
158
+
* as `fd_readdir` function is [not implemented there](https://github.com/nodejs/node/blob/6f4d6011ea1b448cf21f5d363c44e4a4c56ca34c/deps/uvwasi/src/uvwasi.c#L19).*
159
+
*
160
+
* @param directory a directory to list.
161
+
* @return a collection of [directory]'s immediate children.
162
+
* @throws FileNotFoundException if [directory] does not exist.
163
+
* @throws IOException if [directory] points to something other than directory.
164
+
* @throws IOException if there was an underlying error preventing listing [directory] children.
0 commit comments