code: def filemode(mode):
      
      perm = []
      for table in filemode_table:
          for bit, char in table:
              if mode & bit == bit:
                  perm.append(char)
                  break
          else:
              perm.append("-")
      return "".join(perm)
docs: Convert a file's mode to a string of the form
         -rwxrwxrwx.
         Used by TarFile.list()