Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get WASI set up enough to do a directory list #1297

Merged
merged 11 commits into from
Jul 21, 2023

Conversation

swankjesse
Copy link
Collaborator

No description provided.

@swankjesse swankjesse force-pushed the jwilson.0720.wasi_file_system branch from da1675b to de46239 Compare July 20, 2023 17:57

// In theory, fd_readdir uses a 'cookie' field to page through results. In practice the NodeJS
// implementation doesn't honor the cookie and directories with large file names don't progress.
// Instead, just grow the buffer until the entire directory fits.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @sdeleuze not sure if you ran into similar problems. I tested this on some long file names and it got very grumpy very fast.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test it with very long filenames, thanks for the feedback.

@swankjesse swankjesse requested a review from oldergod July 20, 2023 21:13
I can't yet import AbstractFileSystemTest as that has a kotlinx-datetime
dependency, and that artifact isn't available to WASM.
Copy link
Member

@oldergod oldergod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only does it list, but it writes too!

@swankjesse swankjesse enabled auto-merge (squash) July 21, 2023 16:41
@swankjesse swankjesse merged commit 3925039 into master Jul 21, 2023
11 checks passed
@swankjesse swankjesse deleted the jwilson.0720.wasi_file_system branch July 21, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants