Beispiel #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
Beispiel #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
Beispiel #3
0
 def _resolvepath(self, path):
     return normpath('%s/%s' % (self.root, path))
Beispiel #4
0
 def _resolvepath(self, path):
     return normpath('%s/%s' % (self.root, path))
def _fixPath(root, path):
    return normpath('%s/%s' % (root, path))
Beispiel #6
0
def current_component():
    return normpath(relpath(componentStack[topOfComponentStack].name))
def _fixPath(root, path):
    return normpath('%s/%s' % (root,path)) 
def current_component():
    return normpath(relpath(componentStack[topOfComponentStack].name))