Expand description
Contains various std::fs wrapper functions that also contain the target path in their errors.
Functionsยง
- canonicalize_
path - Canonicalize a path, returning an error if the path does not exist.
- copy
- Wrapper for
std::fs::copy - create_
dir - Wrapper for
std::fs::create_dir - create_
dir_ all - Wrapper for
std::fs::create_dir_all - create_
file - Wrapper for
File::create. - files_
with_ ext - Returns an iterator over all files with the given extension under the
rootdir. - json_
files - Returns an iterator over all JSON files under the
rootdir. - locked_
read - Reads the entire contents of a locked shared file into a bytes vector.
- locked_
read_ to_ string - Reads the entire contents of a locked shared file into a string.
- locked_
write - Writes all content in an exclusive locked file.
- locked_
write_ line - Writes a line in an exclusive locked file.
- locked_
write_ ๐line_ windows - normalize_
path - Normalize a path, removing things like
.and... - open
- Wrapper for
std::fs::File::open - read
- Wrapper for
std::fs::read. - read_
inner ๐ - read_
json_ file - Reads the JSON file and deserialize it into the provided type.
- read_
json_ gzip_ file - Reads and decodes the json gzip file, then deserialize it into the provided type.
- read_
link - Wrapper for
std::fs::read_link. - read_
to_ string - Wrapper for
std::fs::read_to_string. - remove_
dir - Wrapper for
std::fs::remove_dir - remove_
dir_ all - Wrapper for
std::fs::remove_dir_all - remove_
file - Wrapper for
std::fs::remove_file. - write
- Wrapper for
std::fs::write - write_
json_ file - Writes the object as a JSON object.
- write_
json_ gzip_ file - Writes the object as a gzip compressed file.
- write_
pretty_ json_ file - Writes the object as a pretty JSON object.