예제 #1
0
 def _get_parsed_record(self, path, all=0):
     path = normpath(path)
     fname = os.path.basename(path)
     res = FtpListResult()
     self._conn.dir(path, res.append)
     if all:
         return res
     record = res.get(os.path.basename(path), res.get(path))
     if not record:
         # in the case of a directory, try again with the parent directory
         parent = os.path.dirname(path)
         res = FtpListResult()
         self._conn.dir(parent, res.append)
         record = res.get(os.path.basename(path), res.get(path))
     return record
예제 #2
0
 def _get_parsed_record(self, path, all=0):
     path=normpath(path)
     fname=os.path.basename(path)
     res=FtpListResult()
     self._conn.dir(path, res.append)
     if all:
         return res
     record=res.get(os.path.basename(path), res.get(path))
     if not record:
         # in the case of a directory, try again with the parent directory
         parent=os.path.dirname(path)
         res=FtpListResult()
         self._conn.dir(parent, res.append)
         record=res.get(os.path.basename(path), res.get(path))
     return record
예제 #3
0
 def _resolvepath(self, path):
     return normpath('%s/%s' % (self.root, path))
예제 #4
0
 def _resolvepath(self, path):
     return normpath('%s/%s' % (self.root, path))
예제 #5
0
def _fixPath(root, path):
    return normpath('%s/%s' % (root, path))
예제 #6
0
def current_component():
    return normpath(relpath(componentStack[topOfComponentStack].name))
예제 #7
0
def _fixPath(root, path):
    return normpath('%s/%s' % (root,path)) 
예제 #8
0
def current_component():
    return normpath(relpath(componentStack[topOfComponentStack].name))