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