def __lsdir(self,path):#
if DEBUG: print "ls dir"
ss = path.split('/')[1]
subdir = '/'+'/'.join(path.split('/')[2:])
dirents = ['.', '..']
#if path == "/" and (self.root.strip('/') == self.BDIRS['loc'].strip('/') or self.root == self.BDIRS['ext'].strip('/')):
if path == "/" and (self.root in self.BDIRS.values()):
self.root = self.BDIRS['loc']
dirents.extend(self.snapshots.keys())
elif ss in self.snapshots or path == "./":
dirents.extend(os.listdir(self.__realpath(path)))
else:
self.root = self.BDIRS['loc']
dirents.extend(os.listdir(path))
return dirents
# def mythread(self):
#
# """
# The beauty of the FUSE python implementation is that with the python interp
# running in foreground, you can have threads
# """
# print "mythread: started"
# while 1:
# time.sleep(120)
# print "mythread: ticking"
评论列表
文章目录