--- a/fuse/accessfs.py
+++ b/fuse/accessfs.py
@@ -50,106 +50,6 @@
def check(self, inst, path, mode):
super(check_and_translate, self).check(inst, path, mode)
return inst._to_global(path)
-
-class LoopbackFS(fuse.Fuse):
- '''Loopback filesystem with hooks for permission management'''
-
- def __init__(self, root, *args, **kwargs):
- super(LoopbackFS, self).__init__(*args, **kwargs)
- self._root = root
-
- @check_and_translate(os.R_OK)
- def getattr(self, path): return os.lstat(path)
-
- @check_and_translate(os.R_OK)
- def readlink(self, path): return os.readlink(path)
-
- @check_and_translate(os.W_OK)
- def mknod(self, path, mode, dev): os.mknod(path, mode, dev)
-
- @check_and_translate(os.W_OK)
- def mkdir(self, path, mode): os.mkdir(path, mode)
-
- @check_and_translate(os.W_OK)
- def unlink(self, path): os.unlink(path)
-
- @check_and_translate(None, os.W_OK)
- def symlink(self, target, name): os.symlink(target, name)
-
- @check_and_translate(os.R_OK|os.W_OK, os.R_OK|os.W_OK)
- def rename(self, old, new): os.rename(old, new)
-
- @check_and_translate(os.R_OK, os.W_OK)
- def link(self, src, dst): os.link(src, dst)
-
- @check_and_translate(None)
- def access(self, path, mode): return os.access(path, mode)
-
- def fsinit(self): pass
-
- def _to_global(self, path):
- return os.path.join(self._root, path)
-
- # @check_access(os.R_OK)
- # def readdir(self, path, offset):
- # for e in os.listdir(self._to_global(path)):
- # yield fuse.Direntry(e)
-
- # def rmdir(self, path):
- # self._assert_access(path, os.W_OK)
- # os.rmdir(self._to_global(path))
-
- # def chmod(self, path, mode):
- # self._assert_access(path, os.W_OK)
- # os.chmod(self._to_global(path), mode)
-
- # def chown(self, path, user, group):
- # self._assert_access(path, os.W_OK)
- # os.chown(self._to_global(path), user, group)
-
- # def truncate(self, path, len):
- # self._assert_access(path, os.W_OK)
- # f = open(self._to_global(path), "a")
- # f.truncate(len)
- # f.close()
-
- # def utime(self, path, times):
- # os.utime(self._to_global(path), times)
-
- # def statfs(self):
- # """
- # Should return an object with statvfs attributes (f_bsize, f_frsize...).
- # Eg., the return value of os.statvfs() is such a thing (since py 2.2).
- # If you are not reusing an existing statvfs object, start with
- # fuse.StatVFS(), and define the attributes.
-
- # To provide usable information (ie., you want sensible df(1)
- # output, you are suggested to specify the following attributes:
-
- # - f_bsize - preferred size of file blocks, in bytes
- # - f_frsize - fundamental size of file blcoks, in bytes
- # [if you have no idea, use the same as blocksize]
- # - f_blocks - total number of blocks in the filesystem
- # - f_bfree - number of free blocks
- # - f_files - total number of file inodes
- # - f_ffree - nunber of free file inodes
- # """
-
- # return os.statvfs(".")
-
- # def make_file_class(self):
- # class FSAccessFile(AccessFile):
- # filesystem=self
- # return FSAccessFile
-
-class OverlayFS(fuse.Fuse):
- '''Filesystem that overlays a read-only GridFS on an existing filesystem'''
-
- def __init__(self, root, gfs, *args, **kwargs):
- super(OverlayFS, self).__init__(*args, **kwargs)
- self._root = root
- self._gfs = gfs
-
def flag2mode(flags):
md = {os.O_RDONLY: 'r', os.O_WRONLY: 'w', os.O_RDWR: 'w+'}