Members
basename
string path.basename
dirname
path path.dirname
None
.
exists
bool 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
path path.get_child(*relative_paths)
Parameters
Parameter | Description |
---|---|
relative_paths
|
required Zero or more relative path strings to append to this path with path separatorsadded as needed. |
is_dir
bool path.is_dir
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
list path.readdir(watch='auto')
path
object itself.
Parameters
Parameter | Description |
---|---|
watch
|
default is 'auto' whether Bazel should watch the list of entries in this directory and refetch the repository or re-evaluate the module extension next time when any changes are detected. Changes to detect include entry creation, deletion, and renaming. Note that this doesn't watch the contents of any entries in the directory. Can be the string 'yes', 'no', or 'auto'. If set to 'auto', Bazel will only watch this directory when it is legal to do so (see |
realpath
path path.realpath