parameters: (directory)
return_statement: return files
docstring: Get the list of files contained in the given directory
docstring_summary: Get the list of files contained in the given directory
docstring_tokens: Get the list of files contained in the given directory
function: def GetDirContents(directory):
          """Get the list of files contained in the given directory"""
          assert os.path.isdir(directory)
          files = list()
          try:
              joinPath = os.path.join
              fappend = files.append
              fs_encoding = sys.getfilesystemencoding()
              for p in os.listdir(directory):
                  fullpath = joinPath(directory, p)
                  if type(fullpath) != types.UnicodeType:
                      fullpath = fullpath.decode(fs_encoding)
                  fappend(fullpath)
          except OSError:
              pass
          return files
function_tokens: def GetDirContents ( directory ) : assert os . path . isdir ( directory ) files = list ( ) try : joinPath = os . path . join fappend = files . append fs_encoding = sys . getfilesystemencoding ( ) for p in os . listdir ( directory ) : fullpath = joinPath ( directory , p ) if type ( fullpath ) != types . UnicodeType : fullpath = fullpath . decode ( fs_encoding ) fappend ( fullpath ) except OSError : pass return files