-
Notifications
You must be signed in to change notification settings - Fork 76
/
README.historic
89 lines (67 loc) · 3.4 KB
/
README.historic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
WARNING:
THIS FILE DOESN'T MATCH CURRENT STATE OF THE AFFAIRS.
Refer to the INSTALL file for build/install instructions
General Information
===================
This is a Python[1] interface to FUSE[2].
FUSE (Filesystem in USErspace) is a simple interface for userspace
programs to export a virtual filesystem to the linux kernel. FUSE
also aims to provide a secure method for non privileged users to
create and mount their own filesystem implementations.
When run from the commandline, "fuse.py" simply reexports the root
filesystem within the mount point as example/fusexmp does in the main
FUSE distribution. It also offers a class, fuse.Fuse, which can be
subclassed to create a filesystem. fuse.Xmp is the example filesystem
implementation.
In your subclass of fuse, add attributes with the expected names
("getattr", "readlink", etc) and call signatures (refer to fuse.Xmp)
then call main(). Make it runnable as a #! script, and mount with
fusermount <mount point> <script name>
for some reason,
fusermount <mount point> python <script name>
does not seem to work. (why?)
Update
======
Updated 13-Dec-2003 by David McNab <[email protected]>
- changed Makefile to use Pyton distutils
- added setup.py for distutils
- added 'code.leo' file for convenience of those who use the Leo
code editor (leo.sf.net)
- added support for 'statfs' and 'fsync' methods (refer xmp.py)
Updated Dec 2003 by David McNab <[email protected]>:
- added support for 'release' events (ie when file gets closed)
- added __init__ to base class, which picks off parameters and
stores them as instance attributes:
- self.mountpoint - the mountpoint as given in the mount command
- self.optlist - unnamed options (eg 'rw', 'exec' etc)
- self.optdict - named options (eg, '-o arg1=val1,arg2=val2...' from mount cmd)
- fixed incompatibility issues with recent pythons (original was broken
under python2.3)
Limitations
===========
This is minimally tested, though I think I have exercised each function.
There's no documentation, docstrings, or tests.
Python's lstat() does not return some fields which must be filled in
(st_blksize, st_blocks, st_ino), and _fusemodule assumes that the return
value from the lstat() method is identical to Python's lstat(). This
limitation should be lifted, and some standard order chosen for these
three values. For now, though, default values are chosen and du returns a
number similar to the "real" one.
The Python Global Interpreter Lock is not handled, so using
fuse.MULTITHREAD will not work. Modifying the PROLOGUE and EPILOGUE
functions may take care of this. For now, just run without
fuse.MULTITHREAD in flags.
Author
======
I'm Jeff Epler <[email protected]>. I've been dabbling in
Python for nearly 7 years now, and interested (despite the lack of a
real practical use) in userspace filesystems ever since I couldn't get
userfs to compile way back in '93 or so. FUSE is cool, but i'm still
not sure what it's good for in practical terms.
I don't know how high a level of interest I'll maintain in this project,
so if you want to do something with it feel free to do so. Like FUSE,
this software is distributed under the terms of the GNU General Public
License, Version 2. Future versions, if any, will be available at [3].
[1] http://www.python.org
[2] http://sourceforge.net/projects/avf/
[3] http://unpythonic.dhs.org/~jepler/fuse/