rfusefs 1.1.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{CHANGES.md → CHANGELOG.md} +6 -0
- data/README.md +14 -69
- data/lib/rfusefs/gem_version.rb +20 -0
- data/lib/rfusefs/version.rb +1 -1
- data/lib/rfusefs.rb +3 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27b8c246b2b2f211b85a08aa44b10e98195a749f4e39e84f601764cfa82be5cf
|
4
|
+
data.tar.gz: b96d669253e91855643aefefbc17cc5fda22c963a429e04f13025fa6fd9e2063
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b424541ed0ebe51de43b72188477e4321bf79064730d5e8839dd0152ee6796f8b58693559c4d1da93e71588fdb3591bd5cb35d8b22c389881479c2200475c582
|
7
|
+
data.tar.gz: 883d20d2f865e90dd8f2ac81aad58eb79741343ea4a272be38d9a4380a1ac3b8471d37433b8d8860e205e0e407fb9cbafa0b5b2e671d0e6f759284f386924de2
|
data/{CHANGES.md → CHANGELOG.md}
RENAMED
data/README.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
-
# rfusefs
|
1
|
+
# rfusefs - DEPRECATED
|
2
|
+
===============
|
2
3
|
|
3
|
-
|
4
|
-
|
4
|
+
### DEPRECATED
|
5
|
+
|
6
|
+
This gem exists and is maintained for backwards compatibility only.
|
7
|
+
|
8
|
+
Existing RFuseFS filesystems are recommended to refactor to depend directly on
|
9
|
+
[ffi_libfuse](http://rubygems.org/gems/ffi-libfuse) which supports Fuse 3 and Macfuse
|
10
|
+
|
11
|
+
---------------
|
5
12
|
|
6
|
-
[<img src="https://badge.fury.io/rb/rfusefs.png" alt="Gem Version"
|
7
|
-
/>](http://badge.fury.io/rb/rfusefs)
|
8
13
|
## DESCRIPTION
|
9
14
|
|
10
15
|
RFuseFS is a port of the [FuseFS](http://rubygems.org/gems/fusefs/) library
|
@@ -13,71 +18,11 @@ filesystems with little more than a few lines of code.
|
|
13
18
|
|
14
19
|
RFuseFS is api compatible with FuseFS (0.7.0)
|
15
20
|
|
16
|
-
## SYNOPSIS
|
17
|
-
|
18
|
-
FuseFS provides a layer of abstraction to a programmer who wants to create a
|
19
|
-
virtual filesystem via FUSE.
|
20
|
-
|
21
|
-
First define a virtual directory by subclassing {FuseFS::FuseDir}
|
22
|
-
|
23
|
-
See samples under /samples and also the following starter classes
|
24
|
-
|
25
|
-
* {FuseFS::FuseDir}
|
26
|
-
* {FuseFS::MetaDir}
|
27
|
-
* {FuseFS::DirLink}
|
28
|
-
* {FuseFS::PathMapperFS}
|
29
|
-
* {FuseFS::SqliteMapperFS}
|
30
|
-
|
31
|
-
|
32
|
-
Then start your filesystem with
|
33
|
-
|
34
|
-
* {FuseFS.main} or {FuseFS.start}
|
35
|
-
|
36
|
-
|
37
|
-
Finally to use the filesystem open up your favourite file browser/terminal and
|
38
|
-
explore the contents under <mountpoint>
|
39
|
-
|
40
|
-
Happy Filesystem Hacking!
|
41
|
-
|
42
|
-
### the hello world filesystem in 14 LOC
|
43
|
-
|
44
|
-
require 'rfusefs'
|
45
|
-
|
46
|
-
class HelloDir
|
47
|
-
|
48
|
-
def contents(path)
|
49
|
-
['hello.txt']
|
50
|
-
end
|
51
|
-
|
52
|
-
def file?(path)
|
53
|
-
path == '/hello.txt'
|
54
|
-
end
|
55
|
-
|
56
|
-
def read_file(path)
|
57
|
-
"Hello, World!\n"
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
# Usage: #{$0} mountpoint [mount_options]
|
63
|
-
FuseFS.main() { |options| HelloDir.new }
|
64
|
-
|
65
21
|
## REQUIREMENTS:
|
66
22
|
|
67
|
-
* FUSE (http://fuse.sourceforge.net)
|
68
|
-
* Ruby (>= 2.
|
69
|
-
* rfuse (~>
|
70
|
-
|
71
|
-
|
72
|
-
## INSTALL:
|
73
|
-
|
74
|
-
* gem install rfusefs
|
75
|
-
|
76
|
-
## DEVELOPERS:
|
77
|
-
|
78
|
-
After checking out the source, run:
|
23
|
+
* FUSE (http://fuse.sourceforge.net) (>= 2.8) or MACFuse
|
24
|
+
* Ruby (>= 2.7)
|
25
|
+
* rfuse (~> 2.0)
|
79
26
|
|
80
|
-
|
81
|
-
$ rake spec # run tests
|
82
|
-
$ rake yard # generate docs
|
27
|
+
## ~~DEVELOPERS~~~
|
83
28
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'version'
|
4
|
+
begin
|
5
|
+
require 'ffi/libfuse/gem_helper'
|
6
|
+
rescue LoadError
|
7
|
+
# allow bundle install to run
|
8
|
+
end
|
9
|
+
|
10
|
+
module RFuseFS
|
11
|
+
# @!visibility private
|
12
|
+
MAIN_BRANCH = 'master'
|
13
|
+
GEM_VERSION, =
|
14
|
+
if defined? FFI::Libfuse
|
15
|
+
FFI::Libfuse::GemHelper.gem_version(version: VERSION, main_branch: MAIN_BRANCH)
|
16
|
+
else
|
17
|
+
"#{VERSION}.pre"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
data/lib/rfusefs/version.rb
CHANGED
data/lib/rfusefs.rb
CHANGED
@@ -79,7 +79,8 @@ module FuseFS
|
|
79
79
|
def FuseFS.mount(root,mountpoint,*opts)
|
80
80
|
|
81
81
|
pid = Kernel.fork do
|
82
|
-
FuseFS.start(root,mountpoint,*opts)
|
82
|
+
status = FuseFS.start(root,mountpoint,*opts)
|
83
|
+
Kernel.exit!(status)
|
83
84
|
end
|
84
85
|
@mounts[mountpoint] = pid
|
85
86
|
pid
|
@@ -96,7 +97,7 @@ module FuseFS
|
|
96
97
|
if (mountpoint)
|
97
98
|
if @mounts.has_key?(mountpoint)
|
98
99
|
pid = @mounts[mountpoint]
|
99
|
-
Process.kill(
|
100
|
+
Process.kill(:TERM,pid)
|
100
101
|
Process.waitpid(pid)
|
101
102
|
else
|
102
103
|
raise "Unknown mountpoint #{mountpoint}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfusefs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant Gardner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rfuse
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,11 +128,10 @@ email:
|
|
128
128
|
- grant@lastweekend.com.au
|
129
129
|
executables: []
|
130
130
|
extensions: []
|
131
|
-
extra_rdoc_files:
|
132
|
-
- CHANGES.md
|
131
|
+
extra_rdoc_files: []
|
133
132
|
files:
|
134
133
|
- ".yardopts"
|
135
|
-
-
|
134
|
+
- CHANGELOG.md
|
136
135
|
- LICENSE
|
137
136
|
- README.md
|
138
137
|
- TODO.md
|
@@ -144,6 +143,7 @@ files:
|
|
144
143
|
- lib/fusefs/pathmapper.rb
|
145
144
|
- lib/fusefs/sqlitemapper.rb
|
146
145
|
- lib/rfusefs.rb
|
146
|
+
- lib/rfusefs/gem_version.rb
|
147
147
|
- lib/rfusefs/version.rb
|
148
148
|
homepage: http://rubygems.org/gems/rfusefs
|
149
149
|
licenses:
|
@@ -157,14 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
157
|
requirements:
|
158
158
|
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: '2.
|
160
|
+
version: '2.7'
|
161
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
|
-
rubygems_version: 3.
|
167
|
+
rubygems_version: 3.1.6
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: Filesystem in Ruby Userspace
|