-
Notifications
You must be signed in to change notification settings - Fork 36
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: implement path_remove_directory and path_unlink_file system calls #50
feat: implement path_remove_directory and path_unlink_file system calls #50
Conversation
Signed-off-by: prakharagarwal1 <prakharagarwal3031@gmail.com>
We have tested the Would love to get some feedback on this approach. |
Signed-off-by: prakharagarwal1 <prakharagarwal3031@gmail.com>
9f9923c
to
f8ac2ca
Compare
Signed-off-by: prakharagarwal1 <prakharagarwal3031@gmail.com>
f8ac2ca
to
d2bc625
Compare
@bjorn3 I have fixed the bug, its working fine now |
src/fs_fd.ts
Outdated
return wasi.ERRNO_NOENT; | ||
} | ||
if (entry.stat().filetype === wasi.FILETYPE_DIRECTORY) { | ||
console.log("file is actually a directory"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace this and the other console.log
below with debug.log
or remove them entirely.
src/fs_core.ts
Outdated
@@ -122,6 +122,28 @@ export class Directory { | |||
return entry; | |||
} | |||
|
|||
get_parent_dir_for_path( | |||
path: string, | |||
): File | Directory | SyncOPFSFile | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function can only return a Directory
or null
, right?
Thanks! |
Fixes #49
This adds support for the path_remove_directory and path_unlink_file system calls.