Expand description
Read back the files that fallow saves, such as baselines, snapshots and setup state.
A flag or a default names each file. A cloned repository can commit a
symlink at that path, so a path below the project root or the working
directory must resolve inside that directory. A path outside both is a
plain path that the user names, and it stays allowed. Each file must be a
regular file of at most DEFAULT_MAX_READ_BYTES bytes.
A parse error names the position only, because the serde text can quote a value of the file.
Functionsยง
- base_
in_ path_ spelling - The ancestor of
path, with..and.applied by text, that isbase. A base can have another spelling through a link, such as/tmpfor/private/tmpon macOS, so an ancestor that resolves tobasealso counts. A link below that ancestor does not movepathout ofbase: the caller then checks where that link resolves.Nonewhenpathis not belowbase. - json_
error_ position - The position of a JSON error, for a message that must not quote the file. An error of a typed conversion has no position, so it gets a fixed text.
- lies_
below - True when
path, with..and.applied by text, isbaseor below it. Seebase_in_path_spelling. - read_
saved_ file - Read the saved file at
path, withrootand the working directory as bases. A relativepathis taken relative to the working directory. - read_
saved_ file_ in_ cwd read_saved_filefor a caller that has no project root. Only the working directory is a base.- read_
saved_ text read_saved_filewith an optionalrootand the limitmax_bytes.