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

Implement filesystem ops #17

Closed
littledivy opened this issue Sep 24, 2020 · 5 comments
Closed

Implement filesystem ops #17

littledivy opened this issue Sep 24, 2020 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Projects

Comments

@littledivy
Copy link
Collaborator

The goal right now is to implement all the file system APIs provided by Deno - https://github.com/denoland/deno/blob/master/cli/ops/fs.rs

There is already a Elsa.readFile binding in core/dispatch.go with it's corresponding js call at js/01_namespace.js.

Looking forward to recieve PRs 😄

@littledivy littledivy added enhancement New feature or request good first issue Good for newcomers labels Sep 24, 2020
@littledivy littledivy pinned this issue Sep 24, 2020
@tooolbox
Copy link

Do you have a full list of all APIs that need to be implemented to achieve parity?

HTTP client, HTTP server, FS, these are all good examples, which I suppose will all wrap the Go stdlib?

Anyway, perhaps the list is just the Node stdlib but I'm curious what your thoughts are.

@notfilippo notfilippo added this to To Do in Elsa 1.0 Sep 25, 2020
@littledivy
Copy link
Collaborator Author

littledivy commented Sep 25, 2020

I think we'll want to implement all the most commonly used APIs first and then think about if we'd want to expand more (this will be a seperate discussion as to how minimal we want to be)

  • readFile
  • writeFile
  • stat
  • remove
  • exists
  • cwd

for ref: https://doc.deno.land/builtin/stable

@notfilippo
Copy link
Contributor

Sure, maybe add some utility methods to read directly utf-8 files since they are the most common

@littledivy
Copy link
Collaborator Author

We're using Afero in #25
Another interesting (and unique) API to offer would be memory based fs - https://github.com/spf13/afero#memmapfs

@littledivy
Copy link
Collaborator Author

All of the above listed APIs have been added 👍

Elsa 1.0 automation moved this from To Do to Done Sep 26, 2020
@littledivy littledivy unpinned this issue Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
No open projects
Development

No branches or pull requests

3 participants