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: initial file system operations #9

Merged
merged 3 commits into from Sep 2, 2023
Merged

feat: initial file system operations #9

merged 3 commits into from Sep 2, 2023

Conversation

Im-Beast
Copy link
Member

@Im-Beast Im-Beast commented Sep 2, 2023

Follow up to #3, most of the code has been reused.
This PR adds support for these API's (#6):

  • fs
    • readFile – async read file and return Uint8Array
    • readFileSync – sync version of fs.readFile
    • readTextFile – async read file and return string
    • readTextFileSync – sync version of fs.readTextFile
    • writeFile – async write file using Uint8Array
    • writeFileSync – sync version of fs.writeFile
    • writeTextFile – async write file using string
    • writeTextFileSync – sync version of fs.readTextFile
    • removeFile - asynchronously delete file
    • removeFileSync - sync version of fs.removeFile
    • removeDirectory - asynchronously delete directory
    • removeDirectorySync - sync version of fs.removeDirectory

This PR doesn't use op2's, it can be done as a follow up
Most of the ops have been converted to op2, the only one that isn't is op_read_text_file

@Im-Beast Im-Beast force-pushed the init-bueno-fs branch 2 times, most recently from 03df4d6 to a877053 Compare September 2, 2023 10:35
@Im-Beast Im-Beast merged commit 2aaf6e5 into main Sep 2, 2023
@Im-Beast Im-Beast deleted the init-bueno-fs branch September 2, 2023 18:27
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.

None yet

1 participant