def walk_storage(path, topdown=True, onerror=None, followlinks=False, storage=private_storage):
 if (not topdown):
  raise NotImplementedError
 if onerror:
  raise NotImplementedError
 roots = [path]
 while len(roots):
  new_roots = []
  for root in roots:
   (dirs, files) = storage.listdir(root)
   files = [smart_str(f) for f in files]
   dirs = [smart_str(d) for d in dirs]
   (yield (root, dirs, files))
   for dn in dirs:
    new_roots.append(('%s/%s' % (root, dn)))
  roots[:] = new_roots

def walk_storage ( path , topdown = True , onerror = None , followlinks = False , storage = private_storage ) : if ( not topdown ) : raise NotImplementedError if onerror : raise NotImplementedError roots = [ path ] while len ( roots ) : new_roots = [ ] for root in roots : ( dirs , files ) = storage . listdir ( root ) files = [ smart_str ( f ) for f in files ] dirs = [ smart_str ( d ) for d in dirs ] ( yield ( root , dirs , files ) ) for dn in dirs : new_roots . append ( ( '%s/%s' % ( root , dn ) ) ) roots [ : ] = new_roots
generate the file names in a stored directory tree by walking the tree top-down .