示例#1
0
    def mount(self, mount_path, parent_path=None):
        FuseBase.mount(self, mount_path, parent_path)

        res = subprocess.call(
            ["google-drive-ocamlfuse -skiptrash " + mount_path], shell=True)
        if res != 0:
            raise RuntimeError("Cannot mount google_drive filesystem [#" +
                               str(res) + "]")
示例#2
0
文件: encfs.py 项目: palob/bups
	def mount(self, mount_path, parent_path=None):
		if parent_path is None:
			raise ValueError("EncFS filesystem requires parent path")

		FuseBase.mount(self, mount_path)

		res = subprocess.call(["encfs --standard --extpass=/usr/lib/ssh/ssh-askpass "+parent_path+" "+mount_path], shell=True)
		if res != 0:
			raise RuntimeError("Cannot mount encfs filesystem [#"+str(res)+"]")
示例#3
0
    def mount(self, mount_path, parent_path=None):
        FuseBase.mount(self, mount_path, parent_path)

        res = subprocess.call(
            ["sshfs " + self.target + ":" + self.path + " " + mount_path],
            shell=True)
        if res != 0:
            raise RuntimeError("Cannot mount sshfs filesystem [#" + str(res) +
                               "]")
示例#4
0
	def mount(self, mount_path, parent_path=None):
		if parent_path is None:
			raise ValueError("EncFS filesystem requires parent path")

		askpass = "******"
		if not os.path.isfile(askpass):
			raise RuntimeError("Cannot find "+askpass)

		FuseBase.mount(self, mount_path)

		res = subprocess.call(["encfs --standard --extpass="******" "+parent_path+" "+mount_path], shell=True)
		if res != 0:
			raise RuntimeError("Cannot mount encfs filesystem [#"+str(res)+"]")
示例#5
0
文件: bup.py 项目: emersion/bups
	def mount(self, mount_path, parent_path=None):
		if parent_path is None and self.bup.get_dir() is None:
			raise ValueError("Bup FUSE filesystem requires parent path")

		FuseBase.mount(self, mount_path, parent_path)

		if parent_path is not None:
			self.bup.set_dir(parent_path)

		self.bup.init()

		self.bup.fuse(mount_path, {
			#"stdout": callbacks["onstatus"],
			#"stderr": callbacks["onstatus"]
		})

		time.sleep(1)
示例#6
0
文件: root.py 项目: emersion/bups
	def mount(self, mount_path, parent_path=None):
		cfg = self.cfg

		if cfg.get("type", "") == "":
			return # Nothing to do

		FuseBase.mount(self, mount_path, parent_path)

		if os.path.ismount(mount_path):
			pass #raise RuntimeError("Filesystem already mounted")
		else:
			cmd = "mount -t "+cfg["type"]+" "+cfg["target"]+" "+mount_path+" -o "+cfg["options"]
			res = sudo(cmd)
			if res == 32:
				pass #raise RuntimeError("Filesystem busy")
			elif res != 0:
				raise RuntimeError("Could not mount "+cfg["type"]+" filesystem [#"+str(res)+"] (command: "+args+")")
示例#7
0
文件: bup.py 项目: zhanggaoxuan/bups
    def mount(self, mount_path, parent_path=None):
        if parent_path is None and self.bup.get_dir() is None:
            raise ValueError("Bup FUSE filesystem requires parent path")

        FuseBase.mount(self, mount_path, parent_path)

        if parent_path is not None:
            self.bup.set_dir(parent_path)

        self.bup.init()

        self.bup.fuse(
            mount_path,
            {
                #"stdout": callbacks["onstatus"],
                #"stderr": callbacks["onstatus"]
            })

        time.sleep(1)
示例#8
0
文件: root.py 项目: zhanggaoxuan/bups
    def mount(self, mount_path, parent_path=None):
        cfg = self.cfg

        if cfg.get("type", "") == "":
            return  # Nothing to do

        FuseBase.mount(self, mount_path, parent_path)

        if os.path.ismount(mount_path):
            pass  #raise RuntimeError("Filesystem already mounted")
        else:
            cmd = "mount -t " + cfg["type"] + " " + cfg[
                "target"] + " " + mount_path + " -o " + cfg["options"]
            res = sudo(cmd)
            if res == 32:
                pass  #raise RuntimeError("Filesystem busy")
            elif res != 0:
                raise RuntimeError("Could not mount " + cfg["type"] +
                                   " filesystem [#" + str(res) +
                                   "] (command: " + args + ")")
示例#9
0
 def __init__(self, cfg):
     FuseBase.__init__(self)
     self.cfg = cfg
示例#10
0
    def mount(self, mount_path, parent_path=None):
        FuseBase.mount(self, mount_path, parent_path)

        res = subprocess.call(["google-drive-ocamlfuse -skiptrash " + mount_path], shell=True)
        if res != 0:
            raise RuntimeError("Cannot mount google_drive filesystem [#" + str(res) + "]")
示例#11
0
文件: bup.py 项目: emersion/bups
	def __init__(self, worker):
		FuseBase.__init__(self)

		self.bup = worker
示例#12
0
文件: encfs.py 项目: palob/bups
	def __init__(self):
		FuseBase.__init__(self)
示例#13
0
文件: sshfs.py 项目: emersion/bups
	def __init__(self, cfg):
		FuseBase.__init__(self)

		self.target = cfg["target"]
		self.path = cfg.get("path", "")
示例#14
0
 def __init__(self, cfg):
     FuseBase.__init__(self)
     self.cfg = cfg
示例#15
0
	def __init__(self):
		FuseBase.__init__(self)
示例#16
0
文件: bup.py 项目: zhanggaoxuan/bups
    def __init__(self, worker):
        FuseBase.__init__(self)

        self.bup = worker
示例#17
0
    def __init__(self, cfg):
        FuseBase.__init__(self)

        self.target = cfg["target"]
        self.path = cfg.get("path", "")
示例#18
0
文件: sshfs.py 项目: emersion/bups
	def mount(self, mount_path, parent_path=None):
		FuseBase.mount(self, mount_path, parent_path)

		res = subprocess.call(["sshfs "+self.target+":"+self.path+" "+mount_path], shell=True)
		if res != 0:
			raise RuntimeError("Cannot mount sshfs filesystem [#"+str(res)+"]")