Skip to main content

read_file_within

Function read_file_within 

Source
pub fn read_file_within(base: &Path, path: &Path) -> Result<String, Error>
Expand description

Reads a file only when its resolved path remains inside base.

ยงErrors

Returns an error if either path cannot be canonicalized, the file is outside base, or the file cannot be read.