Exemplo n.º 1
0
 def run(self):
     if self.args.unmount or self.args.unmount_all:
         unmount(path=self.args.mountpoint,
                 subtype=self.args.subtype,
                 timeout=self.args.unmount_timeout,
                 recursive=self.args.unmount_all)
     elif self.args.exec_args:
         self._run_exec()
     else:
         self._run_standalone()
Exemplo n.º 2
0
 def run(self):
     if self.args.unmount or self.args.unmount_all:
         unmount(path=self.args.mountpoint,
                 subtype=self.args.subtype,
                 timeout=self.args.unmount_timeout,
                 recursive=self.args.unmount_all)
     elif self.args.exec_args:
         self._run_exec()
     else:
         self._run_standalone()
Exemplo n.º 3
0
 def __enter__(self):
     if self.args.replace:
         unmount(path=self.args.mountpoint,
                 timeout=self.args.unmount_timeout)
     llfuse.init(self.operations, self.args.mountpoint, self._fuse_options())
     if self.daemon:
         daemon.DaemonContext(
             working_directory=os.path.dirname(self.args.mountpoint),
             files_preserve=range(
                 3, resource.getrlimit(resource.RLIMIT_NOFILE)[1])
         ).open()
     if self.listen_for_events and not self.args.disable_event_listening:
         self.operations.listen_for_events()
     self.llfuse_thread = threading.Thread(None, lambda: self._llfuse_main())
     self.llfuse_thread.daemon = True
     self.llfuse_thread.start()
     self.operations.initlock.wait()
     return self
Exemplo n.º 4
0
 def __enter__(self):
     if self.args.replace:
         unmount(path=self.args.mountpoint,
                 timeout=self.args.unmount_timeout)
     llfuse.init(self.operations, self.args.mountpoint, self._fuse_options())
     if self.daemon:
         daemon.DaemonContext(
             working_directory=os.path.dirname(self.args.mountpoint),
             files_preserve=range(
                 3, resource.getrlimit(resource.RLIMIT_NOFILE)[1])
         ).open()
     if self.listen_for_events and not self.args.disable_event_listening:
         self.operations.listen_for_events()
     self.llfuse_thread = threading.Thread(None, lambda: self._llfuse_main())
     self.llfuse_thread.daemon = True
     self.llfuse_thread.start()
     self.operations.initlock.wait()
     return self