original_docstring: List game files under a game directory.
docstring: List game files under a game directory.
docstring_tokens: List game files under a game directory .
code: def list_files(self, path):
          """List game files under a game directory."""
          parts = split_game_path(path.lower())
  
          # rebuild full path to remove possible double slashes and to correctly
          # add a slash at the end
          full_path = '/'.join(parts) + '/'
  
          owner, entry = self._find_entry(parts)
          if isinstance(entry, CatFileLoader):
              for e in entry.list_files(''):
                  yield Entry(full_path + e.path, e.name)
          elif isinstance(entry, DirNode):
              # must load ALL .cat files to ensure that all the files in the
              # directory are known
              while owner._load_next_cat_file():
                  pass
  
              for e in entry.children.values():
                  if isinstance(e, CatEntry):
                      yield Entry(full_path + e.name, e.name)
          else:
              raise ValueError(
                  'Path {} isn\'t a file, but a: {}'.format(path, type(entry)))
code_tokens: def list_files ( self , path ) : parts = split_game_path ( path . lower ( ) ) full_path = '/' . join ( parts ) + '/' owner , entry = self . _find_entry ( parts ) if isinstance ( entry , CatFileLoader ) : for e in entry . list_files ( '' ) : yield Entry ( full_path + e . path , e . name ) elif isinstance ( entry , DirNode ) : while owner . _load_next_cat_file ( ) : pass for e in entry . children . values ( ) : if isinstance ( e , CatEntry ) : yield Entry ( full_path + e . name , e . name ) else : raise ValueError ( 'Path {} isn\'t a file, but a: {}' . format ( path , type ( entry ) ) )
short_docstring: List game files under a game directory.
short_docstring_tokens: List game files under a game directory .
comment: """List game files under a game directory."""$SEP$# rebuild full path to remove possible double slashes and to correctly$SEP$# add a slash at the end$SEP$# must load ALL .cat files to ensure that all the files in the$SEP$# directory are known