Expand description
Various utility functions, primarily wrapping the standard library’s IO and filesystem functions
Structs§
Enums§
Constants§
Functions§
- canonicalize
- copy
- Copies the file or directory at source into the target path. If the source is a file and the target is not a directory, the source file is copied to the target path. If the source is a file and the target is a directory, the source file is copied into the target directory. If the source is a directory and the target is not a file, the source directory and all files in it are copied recursively into the target directory. For example, with source=dir1 and target=dir2, dir1/file would be copied to dir2/dir1/file. If the source is a directory and the target is a file, an error is returned.
- create_
dir - create_
dir_ all - create_
file - Note: creates all intermediary directories if needed.
- named_
temp_ file - named_
temp_ file_ in - open_
file - read_
dir - read_
file - read_
file_ to_ string - read_
file_ to_ string_ lossy - read_
reader - read_
to_ file - Reads all of the data from source and writes it into a new file at target.
- remove_
all - Removes whatever is at the path, whether it is a directory or file. The _all suffix hopefully makes the function sound at least slightly dangerous.
- remove_
dir_ all - remove_
dir_ empty - remove_
file - remove_
file_ locked - rename
- temp_
file - write_
to_ file - write_
to_ writer