code: def add_entry(self, path_object):
          
          if (not is_root() and not self.st_mode & PERM_WRITE and
                  not self.filesystem.is_windows_fs):
              exception = IOError if IS_PY2 else OSError
              raise exception(errno.EACCES, 'Permission Denied', self.path)
  
          if path_object.name in self.contents:
              self.filesystem.raise_os_error(errno.EEXIST, self.path)
  
          self.contents[path_object.name] = path_object
          path_object.parent_dir = self
          self.st_nlink += 1
          path_object.st_nlink += 1
          path_object.st_dev = self.st_dev
          if path_object.st_nlink == 1:
              self.filesystem.change_disk_usage(
                  path_object.size, path_object.name, self.st_dev)
docs: Adds a child FakeFile to this directory.
  
          Args:
              path_object: FakeFile instance to add as a child of this directory.
  
          Raises:
              OSError: if the directory has no write permission (Posix only)
              OSError: if the file or directory to be added already exists