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

Stale links in readme (I am making typescript definitions for this library) #65

Open
3n-mb opened this issue Feb 20, 2018 · 7 comments
Open

Comments

@3n-mb
Copy link

3n-mb commented Feb 20, 2018

Link for mount options and FUSE api are stale and don't resolve.

Can you point me to a fresher ones? And can you tell in a few words what is a general translation from FUSE api into javascript expected types. I am making a .d.ts definitions file for this library, and I will PR it.

And, thank you for this nice library.

@piranna
Copy link
Contributor

piranna commented Feb 21, 2018

Can you point me to a fresher ones?

Maybe FUSE has changed its website...

And can you tell in a few words what is a general translation from FUSE api into javascript expected types.

If I correctly understood your question, just a conversion of the types from Javascript to C and viceversa, without almost any other extra logic. fuse-bindings is really low level...

@3n-mb
Copy link
Author

3n-mb commented Feb 21, 2018

Yes. What is type conversion?

  • Simple ones are obvious (or, are they?): String -> string, Number -> int (32 bit, and there are no 64 bits?)
  • But what about structs? attr -> Object? Ok, but can my object have only some fields, while others are missing?
  • And what structs are involved? Is there only attr, or are there other ones? (Excuse my not knowing FUSE at all.)

@piranna
Copy link
Contributor

piranna commented Feb 21, 2018

I'm not the project developer, so I can't be able to answer you that, sorry :-( You'll need to take a look on the code.

@3n-mb
Copy link
Author

3n-mb commented Feb 22, 2018

@piranna I made a PR #66.
Given that you did write fs-use, you may be able to tell me:

  • if Stats object should be exactly like one in fs module, or slightly different.
  • if operators like read with both path: string and file descriptor fd: number should actually be with fd: number|undefined, i.e. doing identification via either path or descriptor.
  • if open must return a file descriptor, and how it plays with either path or descriptor uses.

@3n-mb
Copy link
Author

3n-mb commented Feb 22, 2018

Looking at getattr in example, there is no difference in returned stats. How does other side know that it has a file or directory?

@piedar
Copy link

piedar commented Apr 25, 2018

@3n-mb According to man 7 inode, it looks like the mode is a combination of file type and permissions.

// dr--r--r--
mode = fs.constants.S_IFDIR | fs.constants.S_IRUSR | fs.constants.S_IRGRP | fs.constants.S_IROTH

// -rw-------
mode = fs.constants.S_IFREG | fs.constants.S_IRUSR | fs.constants.S_IWUSR

@piranna
Copy link
Contributor

piranna commented Apr 25, 2018

it looks like the mode is a combination of file type and permissions

You are correct about that.

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