An experimental Filesystem in USErspace (FUSE) with Discord attachments using cgofuse.
⚠️ Use at your own risk! This is an unfinished project and only for research or recreational purposes only.
Files are backed on Discord with a very primitive append-only filesystem.
This is considered pre-alpha software and there will be bugs pertaining to synchronization and functionality.
Here is a blog post going over some implementation details: FUSEing for fun
Go 1.18+ is required due to the use of generics.
Prerequisites: WinFsp, gcc (e.g. from Mingw-builds)
set CPATH=C:\Program Files (x86)\WinFsp\inc\fuse
go build
Prerequisites: WinFsp
set CGO_ENABLED=0
go build
Prerequisites: FUSE for macOS, command line tools
go buildPrerequisites: libfuse-dev, gcc
go buildA drive letter is chosen for Windows if the mount point is not provided.
To run:
dsfs -t <Bot token> -s <Server ID> -m <Mount point>To run with user token:
dsfs -t <Bot token> -s <Server ID> -m <Mount point> -uTo run with transaction compaction:
dsfs -t <Bot token> -s <Server ID> -m <Mount point> -xTo run with FUSE options:
dsfs -t <Bot token> -s <Server ID> -m <Mount point> -o <FUSE option>To get more information about the available options:
dsfs --helpYou can also use DSFS_TOKEN and DSFS_SERVER environment variables in place of -t and -s flags.
# use `set` instead of `export` on Windows
export DSFS_TOKEN=<Bot token>
export DSFS_SERVER=<Server ID>
dsfs -m <Mount point>- If you are using a bot token, you must allow the Message Content Intent for your bot in the Discord Developer Portal.
- If you are having problems with realtime file synchronization, make sure you are using a different token for each instance of dsfs.
- If you are experiencing slow startup times, try using the
-cflag to compact transactions. - If you are using Windows and encountering errors with FUSE, try updating WinFsp to the latest version.
