def main(self, args=None): """Enter filesystem service loop.""" if get_compat_0_1(): args = self.main_0_1_preamble() d = {'multithreaded': self.multithreaded and 1 or 0} d['fuse_args'] = args or self.fuse_args.assemble() for t in 'file_class', 'dir_class': if hasattr(self, t): getattr(self.methproxy, 'set_' + t)(getattr(self, t)) for a in self._attrs: b = a if get_compat_0_1() and a in self.compatmap: b = self.compatmap[a] if hasattr(self, b): c = '' if get_compat_0_1() and hasattr(self, a + '_compat_0_1'): c = '_compat_0_1' d[a] = ErrnoWrapper(self.lowwrap(a + c)) try: main(**d) except FuseError: if args or self.fuse_args.mount_expected(): raise
def main(self, args=None): """Enter filesystem service loop.""" if get_compat_0_1(): args = self.main_0_1_preamble() d = {'multithreaded': self.multithreaded and 1 or 0} d['fuse_args'] = args or self.fuse_args.assemble() for t in 'file_class', 'dir_class': if hasattr(self, t): getattr(self.methproxy, 'set_' + t)(getattr(self,t)) for a in self._attrs: b = a if get_compat_0_1() and a in self.compatmap: b = self.compatmap[a] if hasattr(self, b): c = '' if get_compat_0_1() and hasattr(self, a + '_compat_0_1'): c = '_compat_0_1' d[a] = ErrnoWrapper(self.lowwrap(a + c)) try: main(**d) except FuseError: if args or self.fuse_args.mount_expected(): raise
default='/', help="mirror filesystem from under PATH [default: %default]") server.parse(values=server, errex=1) try: if server.fuse_args.mount_expected(): os.chdir(server.root) except OSError: print("can't enter root of underlying filesystem", file=sys.stderr) sys.exit(1) server.main() if __name__ == '__main__': main() # import os, sys from errno import * from stat import * import fcntl try: import _find_fuse_parts except ImportError: pass import fuse from fuse import Fuse if not hasattr(fuse, '__version__'): raise RuntimeError(