https://github.com/rubyonworld/rfusefs
RFuseFS is a port of the FuseFS library aimed at allowing Ruby programmers to quickly and easily create virtual filesystems with little more than a few lines of code.
https://github.com/rubyonworld/rfusefs
library rails rfusefs ruby
Last synced: 4 months ago
JSON representation
RFuseFS is a port of the FuseFS library aimed at allowing Ruby programmers to quickly and easily create virtual filesystems with little more than a few lines of code.
- Host: GitHub
- URL: https://github.com/rubyonworld/rfusefs
- Owner: RubyOnWorld
- License: mit
- Created: 2022-09-27T15:32:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-28T01:00:50.000Z (over 3 years ago)
- Last Synced: 2025-05-19T20:32:36.757Z (8 months ago)
- Topics: library, rails, rfusefs, ruby
- Language: Ruby
- Homepage:
- Size: 215 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# rfusefs
* https://rubygems.org/gems/rfusefs
* https://github.com/lwoggardner/rfusefs
[
](http://badge.fury.io/rb/rfusefs)
## DESCRIPTION
RFuseFS is a port of the [FuseFS](http://rubygems.org/gems/fusefs/) library
aimed at allowing Ruby programmers to quickly and easily create virtual
filesystems with little more than a few lines of code.
RFuseFS is api compatible with FuseFS (0.7.0)
## SYNOPSIS
FuseFS provides a layer of abstraction to a programmer who wants to create a
virtual filesystem via FUSE.
First define a virtual directory by subclassing {FuseFS::FuseDir}
See samples under /samples and also the following starter classes
* {FuseFS::FuseDir}
* {FuseFS::MetaDir}
* {FuseFS::DirLink}
* {FuseFS::PathMapperFS}
* {FuseFS::SqliteMapperFS}
Then start your filesystem with
* {FuseFS.main} or {FuseFS.start}
Finally to use the filesystem open up your favourite file browser/terminal and
explore the contents under
Happy Filesystem Hacking!
### the hello world filesystem in 14 LOC
require 'rfusefs'
class HelloDir
def contents(path)
['hello.txt']
end
def file?(path)
path == '/hello.txt'
end
def read_file(path)
"Hello, World!\n"
end
end
# Usage: #{$0} mountpoint [mount_options]
FuseFS.main() { |options| HelloDir.new }
## REQUIREMENTS:
* FUSE (http://fuse.sourceforge.net)
* Ruby (>= 2.5)
* rfuse (~> 1.2)
## INSTALL:
* gem install rfusefs
## DEVELOPERS:
After checking out the source, run:
$ bundle install # install dependencies
$ rake spec # run tests
$ rake yard # generate docs