Skip to main content
A structure representing a file to be used inside a repository.

Members

basename

A string giving the basename of the file.

dirname

The parent directory of this file, or None if this file does not have a parent. May return None.

exists

Returns true if the file or directory denoted by this path exists. Note that accessing this field does not cause the path to be watched. If you’d like the repo rule or module extension to be sensitive to the path’s existence, use the watch() method on the context object.

get_child

Returns the path obtained by joining this path with the given relative paths.

Parameters

is_dir

Returns true if this path points to a directory. Note that accessing this field does not cause the path to be watched. If you’d like the repo rule or module extension to be sensitive to whether the path is a directory or a file, use the watch() method on the context object.

readdir

Returns the list of entries in the directory denoted by this path. Each entry is a path object itself.

Parameters

realpath

Returns the canonical path for this path by repeatedly replacing all symbolic links with their referents.