예제 #1
0
 def __init__(self, root, cmd_channel, ftproot, cwd, readonly=False):
     #_Base.__init__(self, root, cmd_channel)
     AbstractedFS.__init__(self, root, cmd_channel)
     self.cwd = cwd
     self.cwdftp = ""
     self.ftproot = ftproot
     self.readonly = readonly
예제 #2
0
 def __init__(self, root, cmd_channel, ftproot, cwd, readonly=False):
     #_Base.__init__(self, root, cmd_channel)
     AbstractedFS.__init__(self, root, cmd_channel)
     self.cwd = cwd
     self.cwdftp = ""
     self.ftproot = ftproot
     self.readonly = readonly
예제 #3
0
	def open(self, filename, mode):
		from errno import EISDIR
		from os import strerror
		if filename is ShareRoot:
			raise IOError(EISDIR, strerror(EISDIR))
		else:
			return AbstractedFS.open(self, filename, mode)
예제 #4
0
 def __init__(self, root, cmd_channel):
     AbstractedFS.__init__(self, root, cmd_channel)
     self.cwd = root
     self.type = cmd_channel.type
     self.s3_bucket = cmd_channel.s3_bucket
     self.aws_access_key = cmd_channel.aws_access_key
     self.aws_secret_key = cmd_channel.aws_secret_key
     self.seperator = cmd_channel.seperator
     self.thread_synchronize = cmd_channel.thread_synchronize
     self.key_sync_timeout = cmd_channel.key_sync_timeout
     if not self.cmd_channel.fs_obj:
         if self.type == "memory":
             self.fs_obj = MemoryFS()
         elif self.type == "s3":
             self.fs_obj = S3FS(bucket=self.bucket, prefix=self.prefix, aws_access_key=self.aws_access_key, aws_secret_key=self.aws_secret_key, separator=self.seperator, thread_synchronize=self.thread_synchronize, key_sync_timeout=self.key_sync_timeout)
         self.cmd_channel.fs_obj = self.fs_obj
     else:
         self.fs_obj = self.cmd_channel.fs_obj
예제 #5
0
 def __init__(self, root, cmd_channel):
     AbstractedFS.__init__(self, root, cmd_channel)
     # initial cwd was set to "/" to emulate a chroot jail
     self.cwd = root
예제 #6
0
 def __init__(self, root, cmd_channel, list):
     AbstractedFS.__init__(self, root, cmd_channel)
     self.cwd = root
     self.list = list
예제 #7
0
파일: filesystems.py 프로젝트: tackelua/Qt
 def __init__(self, root, cmd_channel):
     AbstractedFS.__init__(self, root, cmd_channel)
     # initial cwd was set to "/" to emulate a chroot jail
     self.cwd = root
예제 #8
0
	def chdir(self, path):
		if path is ShareRoot:
			self.cwd = "/"
			return
		else:
			return AbstractedFS.chdir(self, path)
예제 #9
0
	def isfile(self, path):
		#pdb.set_trace()
		if path is ShareRoot:
			return False
		else:
			return AbstractedFS.isfile(self, path)
예제 #10
0
	def realpath(self, path):
		if path in (ShareRoot, InvalidPath):
			return path
		else:
			return AbstractedFS.realpath(self, path)
예제 #11
0
	def __init__(self):
		AbstractedFS.__init__(self)
예제 #12
0
	def joinpath(self, head, tail):
		if head is ShareRoot:
			return self.shares[tail]
		else:
			return AbstractedFS.joinpath(self, head, tail)
예제 #13
0
	def listdir(self, path):
		if path is ShareRoot:
			return self.shares.keys()
		else:
			return AbstractedFS.listdir(self, path)
예제 #14
0
	def isdir(self, path):
		if path is ShareRoot:
			return True
		else:
			return AbstractedFS.isdir(self, path)
예제 #15
0
 def __init__(self, root, cmd_channel, list):
     AbstractedFS.__init__(self, root, cmd_channel)
     self.cwd = root
     self.list = list