|new 0.2.1||Apr 30, 2021|
|0.2.0||Apr 30, 2021|
|0.1.0||Apr 25, 2020|
#66 in Filesystem
Use your package manager to install dependencies:
- fuse (libfuse)
Install it from crates.io:
cargo install onedrive-fuse
For the first time, you should register your own Application (Client) ID for the API access.
doc/register_app.md for steps.
Login to your OneDrive account with Client ID of your own application.
This will prompt a browser window to ask you to login your Microsoft account for OneDrive.
After a successful login, the page will redirect your to a blank page whose URL contains
then copy the FULL URL, paste it to the terminal and press enter to login.
# Login with read-only access. onedrive-fuse login --client-id <paste-your-client-id-here> # Or login with read-write access. # onedrive-fuse login --read-write --client-id <paste-your-client-id-here>
Your access token will be saved to to XDG config directory,
which is default to be
Finally, mount your OneDrive to a empty directory.
It works in foreground by default, the terminal window should be kept opened.
It will fetch the whole tree hierarchy before mounting,
please wait for
FUSE initialized to be shown and the filesystem is now mounted.
mkdir -p ~/onedrive # The directory to be mounted should be empty. onedrive-fuse mount ~/onedrive # Or if you want to read-writea access. The token must be authorized to have read-write access. # Use it with care. Bugs may corrupt your OneDrive data. # onedrive-fuse mount ~/onedrive -o permission.readonly=false
Umount the fuse filesystem gracefully.
You should NOT directly
Ctrl-C or kill the
Warning: Wait your upload session to be finished before umounting the filesystem. Currently we don't yet implemented waiting for uploading before shutdown.
fusermount -u ~/onedrive
- FUSE syscalls
- Statfs cache
- Inode attributes (stat) cache
- Directory tree cache
- Sync remote changes with local cache
- File read cache
- File write cache/buffer