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

allow callbacks to make this a giant polyfill? #12

Closed
jonathanong opened this issue Jan 10, 2015 · 5 comments
Closed

allow callbacks to make this a giant polyfill? #12

jonathanong opened this issue Jan 10, 2015 · 5 comments

Comments

@jonathanong
Copy link
Contributor

since we have node and io.js now, i'm thinking of a library that normalizes both as much as possible. an example is #11. we should add callbacks back and always return promises so people can always use mz vs. only for promises.

/cc @dougwilson @dead-horse

@dougwilson
Copy link

The trick would of course be how to even emulate access in Node.js, since it's core is permission checking, not really a rename of exists.

@timoxley
Copy link

@dougwilson just wrap up the fs.stat interface. I'm wondering if a binary extension could work better so you don't lose the fs.access speedup over fs.stat.

@dougwilson
Copy link

It just sounds like a lot of work; you have to check the uid and gid of the process to the file and consider the mode. Then you have the sticky bit and how it changes how those comparisons work (and the meaning of the sticky bit differs by OS).

@dougwilson
Copy link

And just as a disclaimer I have not really read the fs.access API beyond just that it is used to determine what types of access the process has to a given file.

@jonathanong
Copy link
Contributor Author

done

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

No branches or pull requests

3 participants