MCPcopy
hub / github.com/mkdocs/mkdocs / append

Method append

mkdocs/structure/files.py:97–104  ·  view source on GitHub ↗

Add file to the Files collection.

(self, file: File)

Source from the content-addressed store, hash-verified

95 return self._src_uris.get(PurePath(path).as_posix())
96
97 def append(self, file: File) -> None:
98 """Add file to the Files collection."""
99 if file.src_uri in self._src_uris:
100 warnings.warn(
101 "To replace an existing file, call `remove` before `append`.", DeprecationWarning
102 )
103 del self._src_uris[file.src_uri]
104 self._src_uris[file.src_uri] = file
105
106 def remove(self, file: File) -> None:
107 """Remove file from Files collection."""

Callers 15

add_files_from_themeMethod · 0.95
test_filesMethod · 0.95
__init__Method · 0.80
_load_theme_configMethod · 0.80
run_validationMethod · 0.80
on_configMethod · 0.80
on_post_buildMethod · 0.80
_add_entryMethod · 0.80
handle_starttagMethod · 0.80
handle_dataMethod · 0.80

Calls

no outgoing calls

Tested by 11

test_filesMethod · 0.76
on_build_errorMethod · 0.64
on_files_1Method · 0.64
test_script_tagMethod · 0.64
pre_validationMethod · 0.64
run_validationMethod · 0.64
post_validationMethod · 0.64