def get_all_files(folder, strip_prefix='', prefix=None):
 all_files = []
 def iterate(path):
  (path_dirs, path_files) = storage.listdir(path)
  for dirname in sorted(path_dirs):
   full = os.path.join(path, dirname)
   all_files.append(full)
   iterate(full)
  for filename in sorted(path_files):
   full = os.path.join(path, filename)
   all_files.append(full)
 iterate(folder)
 if (prefix is not None):
  all_files = [os.path.join(prefix, fname[(len(strip_prefix) + 1):]) for fname in all_files]
 return all_files

def get_all_files ( folder , strip_prefix = '' , prefix = None ) : all_files = [ ] def iterate ( path ) : ( path_dirs , path_files ) = storage . listdir ( path ) for dirname in sorted ( path_dirs ) : full = os . path . join ( path , dirname ) all_files . append ( full ) iterate ( full ) for filename in sorted ( path_files ) : full = os . path . join ( path , filename ) all_files . append ( full ) iterate ( folder ) if ( prefix is not None ) : all_files = [ os . path . join ( prefix , fname [ ( len ( strip_prefix ) + 1 ) : ] ) for fname in all_files ] return all_files
return all files in a file/directory tree .