s4cmd.py
def relative_dir_walk(self, dir):
    '''Generic version of directory walk. Return file list without base path
       for comparison.
    '''
    result = []

    if S3URL.is_valid(dir):
      basepath = S3URL(dir).path
      for f in (f for f in self.s3walk(dir) if not f['is_dir']):
        result.append(os.path.relpath(S3URL(f['name']).path, basepath))
    else:
      for f in (f for f in self.local_walk(dir) if not os.path.isdir(f)):
        result.append(os.path.relpath(f, dir))

    return result
def relative_dir_walk(self, dir):
    '''Generic version of directory walk. Return file list without base path
       for comparison.
    '''
    result = []

    if S3URL.is_valid(dir):
      basepath = S3URL(dir).path
      for f in (f for f in self.s3walk(dir) if not f['is_dir']):
        result.append(os.path.relpath(S3URL(f['name']).path, basepath))
    else:
      for f in (f for f in self.local_walk(dir) if not os.path.isdir(f)):
        result.append(os.path.relpath(f, dir))

    return result
def relative_dir_walk ( self , dir ) : result = [ ] if S3URL . is_valid ( dir ) : basepath = S3URL ( dir ) . path for f in ( f for f in self . s3walk ( dir ) if not f [ 'is_dir' ] ) : result . append ( os . path . relpath ( S3URL ( f [ 'name' ] ) . path , basepath ) ) else : for f in ( f for f in self . local_walk ( dir ) if not os . path . isdir ( f ) ) : result . append ( os . path . relpath ( f , dir ) ) return result
Generic version of directory walk. Return file list without base path
       for comparison.
Generic version of directory walk . Return file list without base path for comparison .