Download - Python & FUSE
![Page 1: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/1.jpg)
Simple Filesystems with Python and FUSE
Joseph Scotthttp://josephscott.org/
![Page 2: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/2.jpg)
Python
http://www.python.org/
![Page 3: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/3.jpg)
FUSE - Filesystem in Userspace
http://fuse.sourceforge.net/
![Page 4: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/4.jpg)
Why FUSE?
- Non-privileged users- Simple installation- Multiple language bindings
C, C++, Java, C#, Python, Perl, Ruby, Lua, etc.- Easy filesystem experiments
![Page 5: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/5.jpg)
FUSE based filesystems
๏ redisfs - http://www.steve.org.uk/Software/redisfs/๏ Gluser - http://www.gluster.org/๏ sshfs - http://fuse.sourceforge.net/sshfs.html๏ gmailfs - http://sr71.net/projects/gmailfs/๏ WikipediaFS - http://wikipediafs.sourceforge.net/๏ s3fsc - https://github.com/tongwang/s3fs-c
![Page 6: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/6.jpg)
FUSE APIgetattr( path )readlink( path )mknod( path, mode, dev )mkdir( path, mode )unlink( path )symlink( target, name )rename( old, new )link( srcpath, targetpath )fsinit( self )chmod( path, mode )chown( path, uid, gid )
open( path, mode )create( path, mode )read( path, length, offset )write( path, data, offset )getattr( path )truncate( path, len )flush( path )release( path )fsync( path )readdir( path )rmdir( path )
http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FUSE_Python_Reference
![Page 7: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/7.jpg)
Another FUSE Presentation
http://www.slideshare.net/matteobertozzi/python-fuse
I learned lots from this,inspired some of my examples
![Page 8: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/8.jpg)
My Approach
Implement the fewest methodsnecessary for getting the job done
![Page 9: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/9.jpg)
Live Examples
![Page 10: Python & FUSE](https://reader038.vdocument.in/reader038/viewer/2022100603/559513c91a28abdf748b458f/html5/thumbnails/10.jpg)
Questions?