Skip to content

Commit 2979395

Browse files
committed
Document FileSystem::list unavailability for wasmWasi on NodeJS+Windows
1 parent 300e482 commit 2979395

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

core/Module.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,8 @@ Core IO primitives.
8282
# Package kotlinx.io.files
8383

8484
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).

core/common/src/files/FileSystem.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ public sealed interface FileSystem {
152152
* If path [directory] was an absolute path, a returned list will also contain absolute paths.
153153
* If it was a relative path, a returned list will contain relative paths.
154154
*
155+
* *For `wasmWasi` target, function does not work with NodeJS runtime on Windows,
156+
* as `fd_readdir` function is [not implemented there](https://github.com/nodejs/node/blob/6f4d6011ea1b448cf21f5d363c44e4a4c56ca34c/deps/uvwasi/src/uvwasi.c#L19).*
157+
*
158+
*
155159
* @param directory a directory to list.
156160
* @return a list of [directory]'s immediate children.
157161
* @throws FileNotFoundException if [directory] does not exist.

0 commit comments

Comments
 (0)