Download - Python & FUSE

Transcript
Page 1: Python & FUSE

Simple Filesystems with Python and FUSE

Joseph Scotthttp://josephscott.org/

Page 2: Python & FUSE

Python

http://www.python.org/

Page 3: Python & FUSE

FUSE - Filesystem in Userspace

http://fuse.sourceforge.net/

Page 4: Python & FUSE

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

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

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

Another FUSE Presentation

http://www.slideshare.net/matteobertozzi/python-fuse

I learned lots from this,inspired some of my examples

Page 8: Python & FUSE

My Approach

Implement the fewest methodsnecessary for getting the job done

Page 9: Python & FUSE

Live Examples

Page 10: Python & FUSE

Questions?

Page 11: Python & FUSE

Joseph Scott

http://josephscott.org/[email protected]

@josephscott


Top Related