module documentation

Operating system-related utility functions for Sphinx.

Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Constant SEP Undocumented
Variable fs​_encoding Undocumented
Variable no​_fn​_re Undocumented
Variable ​Path Undocumented
Variable project​_suffix​_re Undocumented
Class ​File​Avoid​Write File-like object that buffers output and only writes if content changed.
Function abspath Undocumented
Function canon​_path Return path in OS-independent form
Function cd Undocumented
Function copyfile Copy a file and its modification times, if possible.
Function copytimes Copy a file's modification times.
Function ensuredir Ensure that a path exists.
Function make​_filename Undocumented
Function make​_filename​_from​_project Undocumented
Function movefile Move a file, removing the destination if it exists.
Function mtimes​_of​_files Undocumented
Function os​_path Undocumented
Function relative​_uri Return a relative URL from base to to.
Function relpath Return a relative filepath to path either from the current directory or from an optional start directory.
Function rmtree Undocumented
SEP: str =

Undocumented

Value
'/'
fs_encoding =

Undocumented

no_fn_re =

Undocumented

Path =

Undocumented

project_suffix_re =

Undocumented

def abspath(pathdir):

Undocumented

Parameters
pathdir:strUndocumented
Returns
strUndocumented
def canon_path(nativepath):
Return path in OS-independent form
Parameters
nativepath:strUndocumented
Returns
strUndocumented
@contextlib.contextmanager
def cd(target_dir):

Undocumented

Parameters
target​_dir:strUndocumented
Returns
Generator[None, None, None]Undocumented
def copyfile(source, dest):

Copy a file and its modification times, if possible.

Note: copyfile skips copying if the file has not been changed

Parameters
source:strUndocumented
dest:strUndocumented
def copytimes(source, dest):
Copy a file's modification times.
Parameters
source:strUndocumented
dest:strUndocumented
def ensuredir(path):
Ensure that a path exists.
Parameters
path:strUndocumented
def make_filename(string):

Undocumented

Parameters
string:strUndocumented
Returns
strUndocumented
def make_filename_from_project(project):

Undocumented

Parameters
project:strUndocumented
Returns
strUndocumented
def movefile(source, dest):
Move a file, removing the destination if it exists.
Parameters
source:strUndocumented
dest:strUndocumented
def mtimes_of_files(dirnames, suffix):

Undocumented

Parameters
dirnames:List[str]Undocumented
suffix:strUndocumented
Returns
Iterator[float]Undocumented
def os_path(canonicalpath):

Undocumented

Parameters
canonicalpath:strUndocumented
Returns
strUndocumented
def relative_uri(base, to):
Return a relative URL from base to to.
Parameters
base:strUndocumented
to:strUndocumented
Returns
strUndocumented
def relpath(path, start=os.curdir):

Return a relative filepath to path either from the current directory or from an optional start directory.

This is an alternative of os.path.relpath(). This returns original path if path and start are on different drives (for Windows platform).

Parameters
path:strUndocumented
start:strUndocumented
Returns
strUndocumented
def rmtree(path):

Undocumented

Parameters
path:strUndocumented