def FS__init__(self, sender, db_file, drive_file): self.ll = LL(drive_file) self.db = initDB(db_file, join(dirname(abspath(__file__)), "..", "..", "pirannafs", "sql")) self.db.parse_dir(join(dirname(abspath(__file__)), "sql"), False, True) self.db.create(length=self.ll.Get_NumSectors(), sector=0) # Set the Dir objects to use the plugin database and low-level file # instances instead of the filesystem main ones BaseFile.db = self.db BaseFile.ll = self.ll module = sender.__class__.__module__ if module == "pirannafs.backends.fuse": return backends.fuse.File if module == "pirannafs.backends.pyfilesystem": return backends.pyfilesystem.File
def FS__init__(self, sender, db_file): self.db = initDB(db_file, join(dirname(abspath(__file__)), "..", "..", "pirannafs", "sql")) self.db.parse_dir(join(dirname(abspath(__file__)), "sql"), False, True) self.db.create(type=S_IFDIR) # Set the Dir objects to use the plugin database instance instead of # the filesystem main one BaseDir.db = self.db plugins.connect(self.link, "FS.link") plugins.connect(self.rename, "FS.rename") plugins.connect(self.unlink, "FS.unlink") plugins.connect(self._Get_Inode, "Dir._Get_Inode") module = sender.__class__.__module__ if module == "pirannafs.backends.fuse": return backends.fuse.Dir if module == "pirannafs.backends.pyfilesystem": return backends.pyfilesystem.Dir
def FS__init__(self, db_file): self.db = initDB(db_file, join(dirname(abspath(__file__)), '..', '..', 'pirannafs', 'sql')) self.db.create()