code: def AddDirectory(self, path):
      
      if self.file_system.FileEntryExistsByPath(path):
        raise ValueError('Path: {0:s} already set.'.format(path))
  
      self._AddParentDirectories(path)
      self.file_system.AddFileEntry(
          path, file_entry_type=definitions.FILE_ENTRY_TYPE_DIRECTORY)
docs: Adds a directory to the fake file system.
  
      Note that this function will create parent directories if needed.
  
      Args:
        path (str): path of the directory within the fake file system.
  
      Raises:
        ValueError: if the path is already set.