MCPcopy Create free account
hub / github.com/libgit2/pygit2 / remove_directory

Method remove_directory

pygit2/index.py:186–189  ·  view source on GitHub ↗

Remove a directory from the Index.

(self, path: PathLike[str] | str, level: int = 0)

Source from the content-addressed store, hash-verified

184 check_error(err, io=True)
185
186 def remove_directory(self, path: PathLike[str] | str, level: int = 0) -> None:
187 """Remove a directory from the Index."""
188 err = C.git_index_remove_directory(self._index, to_bytes(path), level)
189 check_error(err, io=True)
190
191 def remove_all(self, pathspecs: typing.Sequence[str | PathLike[str]]) -> None:
192 """Remove all index entries matching pathspecs."""

Callers 2

test_remove_directoryFunction · 0.80

Calls 2

to_bytesFunction · 0.85
check_errorFunction · 0.85

Tested by 2

test_remove_directoryFunction · 0.64