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

feat(vfs) Add ability to rename a file with mem_fs #2551

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Sep 2, 2021

Description

This patch updates wasmer_vfs::mem_fs::FileSystem::rename to handle file. Directories were handle previously, but not file.

Tests must be added though.

It solves the last bits of #2546.

@Hywan Hywan added 🎉 enhancement New feature! 📦 lib-vfs About wasmer-vfs labels Sep 2, 2021
@Hywan Hywan self-assigned this Sep 2, 2021
This patch adds test cases for renaming a file or a directory, and for
renaming + moving. That's different because this patch also implements
a shortcut when a file or directory is simply renamed, we don't need
to update the parent's children, only the modified time.
@Hywan Hywan marked this pull request as ready for review September 3, 2021 08:29
@Hywan
Copy link
Contributor Author

Hywan commented Sep 3, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 3, 2021

@bors bors bot merged commit d07997e into wasmerio:master Sep 3, 2021
bors bot added a commit that referenced this pull request Sep 3, 2021
2546: test(wasi) Running all WASI tests with `wasmer_vfs::mem_fs` too r=Hywan a=Hywan

# Description

This WIP PR updates our WASI test framework to specifically test with `wasmer_vfs::host_fs` (the default, as of now) _and_ with `wasmer_vfs::mem_fs` (🆕!).

Bug trophies:

* #2545
* #2550
* #2551

# Review

- [ ] Add a short description of the change to the CHANGELOG.md file


Co-authored-by: Ivan Enderlin <ivan@mnt.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-vfs About wasmer-vfs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants