fusejs icon indicating copy to clipboard operation
fusejs copied to clipboard

Request: docs

Open ghost opened this issue 9 years ago • 13 comments

Please, for the love of all things holy update the docs so that I don't have to go reading through .cc files or your gdrive implementation to figure out how this works!!!

Seriously, awesome work, thanks :) Docs would be nice though :smile_cat:

I think a great first step would be just the reply object.

ghost avatar Aug 14 '15 18:08 ghost

Sorry about that! We are looking into addressing this in #1 and #2.

c4milo avatar Aug 14 '15 18:08 c4milo

However, if you want to contribute some documentation it will be very welcomed.

c4milo avatar Aug 14 '15 18:08 c4milo

Are you currently using a doc generator anywhere? I think the easiest way would be to block-comment the methods in the .cc files. I'd be happy to start it when I have time, but need to know which specific format to follow

ghost avatar Aug 14 '15 18:08 ghost

We haven't chosen any, feel free to make it any suggestions.

On Fri, Aug 14, 2015 at 2:52 PM Mark Kahn [email protected] wrote:

Are you currently using a doc generator anywhere? I think the easiest way would be to block-comment the methods in the .cc files. I'd be happy to start it when I have time, but need to know which specific format to follow

— Reply to this email directly or view it on GitHub https://github.com/c4milo/fusejs/issues/20#issuecomment-131208389.

c4milo avatar Aug 14 '15 18:08 c4milo

Got me, I haven't written C in ages :)

ghost avatar Aug 14 '15 19:08 ghost

you can look at the fuse.js file(https://github.com/c4milo/fusejs/blob/master/fuse.js) the class implements all of the functions. you can extend the class or create a new class that implements the same names.

EricTheMagician avatar Aug 14 '15 19:08 EricTheMagician

@thejinx0r -- Yeah, but the reply object isn't documented, nor what any of the actual objects are (context, attrs, etc etc). It makes it very difficult to work with right now since you have to either copy example code or run it just to log/inspect the arguments.

ghost avatar Aug 14 '15 19:08 ghost

@zyklus

When I started to use fusejs, these were the pages that I used: http://fuse.sourceforge.net/doxygen/structfuse__lowlevel__ops.html http://fuse.sourceforge.net/doxygen/fuse__lowlevel_8h.html

The function signatures should be the same.

I'm not sure if I will document the C++ code for usage. I will write up an example with a simple example and probably a loopback system.

EricTheMagician avatar Aug 14 '15 20:08 EricTheMagician

Would you have any issues with examples using ES6?

EricTheMagician avatar Aug 14 '15 20:08 EricTheMagician

@thejinx0r I personally wouldn't have any issues, I would love us to start using ES6.

c4milo avatar Aug 14 '15 21:08 c4milo

@thejinx0r -- I'm not really suggesting documenting the C++ usage, just suggesting that the best place to document the functions might be from comments in the .cc files since that's where everything is defined. They'd be documenting the JS API still.

+1 ES6 (ES2015)

And thanks! The sourceforge docs are pretty close to what I'm looking for. Do you know of anything specific that isn't a 1-1 mapping from those? e.g. fuse_reply_err --> reply.err

ghost avatar Aug 15 '15 04:08 ghost

Unrelated question (don't want to start a new issue for a simple question): Doesn't fuse have higher-level bindings that work with paths instead of inodes?

Do you happen to know if it's 100% safe to unmount/remount and provide different inodes for the same paths? My thinking is that it would be seen as a new filesystem, so any existing references would be invalid, but I'm curious as to whether anything could keep old references and try to use them.

ghost avatar Aug 15 '15 04:08 ghost

@zyklus Yes, but it does block the event loop and you have to do acrobatics to make it work, the low level API is asynchronous out of the box. Please ask these questions in the Gitter chat instead. Let's keep the discussion focused on the docs only.

c4milo avatar Aug 15 '15 04:08 c4milo