Here I’ll show in simple steps how to create a file system (CowFS) with Ruby and FUSE. In 5 minutes you will be able to create your own file system.
sudo gem install rfusefs
# main.rb require 'rfusefs' class CowFS def contents(path) ['rose.txt'] end def file?(path) path == '/rose.txt' end def read_file(path) "Moo?!\n" end end cowfs = CowFS.new FuseFS.start(cowfs, '/mnt/test')(more…)