Git Product home page Git Product logo

Comments (11)

billziss-gh avatar billziss-gh commented on June 2, 2024

I do not believe that this is possible with the regular FUSE API.

WinFsp on Windows and FUSE low-level on UNIX do have the capability to satisfy a readdir asynchronously. But this capability cannot be exposed via the regular FUSE API.

from cgofuse.

nduong-ol avatar nduong-ol commented on June 2, 2024

Is it possible to modify the current fuse API of cgofuse to make it possible? If yes, can you give me some pointers on how it could be done?

from cgofuse.

billziss-gh avatar billziss-gh commented on June 2, 2024

As said this is not possible within the FUSE high-level API.

For Windows you would have to use the native WinFsp API. For UNIX you would have to use the FUSE low-level API. In either case cgofuse would not be of much help to you.

from cgofuse.

nduong-ol avatar nduong-ol commented on June 2, 2024

Which Winfsp API should I use to implement this async mechanism?

from cgofuse.

billziss-gh avatar billziss-gh commented on June 2, 2024

You would use the native WinFsp API:

https://github.com/winfsp/winfsp/wiki/WinFsp-API-winfsp.h

See the ReadDirectory operation.

from cgofuse.

nduong-ol avatar nduong-ol commented on June 2, 2024

Thanks for the pointer. After digging a little bit, I found previous issue on rclone that mentioned that with the FileSystemHost.Notify() we can trigger the file explorer to reload the directory when we have new element available right?

from cgofuse.

billziss-gh avatar billziss-gh commented on June 2, 2024

Yes, that's possible.

from cgofuse.

nduong-ol avatar nduong-ol commented on June 2, 2024

Is the FileSystemHost.Notify() function only works on Windows? I saw the NotifyFs only made available for Windows. I tried to used this function on Mac but I wouldn't see the same effect as on windows, the Notify() return false. Could you tell me if I'm missing something?

from cgofuse.

billziss-gh avatar billziss-gh commented on June 2, 2024

The notify functionality is only available on Windows. It is a WinFsp extension not available on FUSE.

from cgofuse.

nduong-ol avatar nduong-ol commented on June 2, 2024

Do you have any recommendation on how we can port it to Fuse? I would make a PR to have this function available for Fuse

from cgofuse.

nduong-ol avatar nduong-ol commented on June 2, 2024

Hello @billziss-gh with winfsp on windows, I only manage to notify the file explorer that there is a new file when emit an event on the specific file. The file explorer seems to add only the file indicated in the event instead of reloading the whole folder. This cause a few issue when I have a lot of files popping up, the file explorer tent to ignore these events. Is there anyway I can trigger a full reload of the file explorer instead of it just adding a single file per event at a time?

from cgofuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.