code: def chmod(self, path, mode):
          
          _complain_ifclosed(self.closed)
          try:
              return self.fs.chmod(path, mode)
          except TypeError:
              mode = self.__compute_mode_from_string(path, mode)
              return self.fs.chmod(path, mode)
docs: Change file mode bits.
  
          :type path: str
          :param path: the path to the file or directory
          :type mode: int
          :param mode: the bitmask to set it to (e.g., 0777)
          :raises: :exc:`~exceptions.IOError`