Linux Fu: User Space File Systems – Now Also For Windows!

One of the advantages of the Unix philosophy that Linux inherited is that the file system is very modular. This is also fine, as a typical system might want a choice of file systems like ext4, reiserfs, btrfs, and even network systems like nfs. Besides that, there are fake file systems like /sys and /dev that help Linux make everything look like a file. The downside is that building a filesystem required changing the kernel, or at least writing a loadable module. It’s not as hard as it sounds, but it’s a bit harder than writing a normal program. Then came FUSE – filesystem in userspace. This is a unique file system module that allows you to create new file systems by writing ordinary code.

My favorite fuses

There are several FUSE file systems that are really useful. Here are some of my favorites:

  • sshfs – Mount a remote filesystem using nothing more than ssh access
  • rclone – Rclone can access and mount many remote filesystems
  • tagassistant – Store files with a single access method to tags
  • fuse-zip – Mount zip files
  • gitfs – Mount with git

There are many more. You can find systems to work with, for example, NTFS and a lot of cloud service providers.

What about Windows?

If this is such a great idea, is there a Windows equivalent? Yes there is. Winfsp seems like a great way to achieve the same effect on Windows, although it’s not just plug-and-play compatible with FUSE. There is a FUSE compatibility wrapper that makes it easier for you to port the existing FUSE code. In fact, there are two FUSE wrappers, one for version 2.8 and another for version 3.2.

This is a newer project, but there is also Dokan which also claims to have a FUSE wrapper for its API. According to Winfsp-provide benchmarks, however, Winfsp works better.

And so?

If you have a favorite FUSE system, it’s probably open source and you can try porting it to Windows, if you want. If you don’t use Windows and want to write your own FUSE system, these systems give you a way to potentially easily move your work to Windows.

For example, you may have a data logger and want to expose its data as a file system. It’s not that hard to do. There is a data structure to fill in, and you don’t need to fill it all in. You provide functions that the data structure points to that read and write things like directories and file data. Here’s an example in C. Or try a C ++ wrapper that lets you write one with even fewer lines of code. The example has only four simple functions.

About Jon Moses

Check Also

Raspberry Pi Desktop – the x86 version – update • The Register

The Raspberry Pi Foundation has updated its lightweight Linux for 32-bit PCs. When the first …