Available on crate feature
kernel
only.Expand description
File path utilities.
Some of the functions are similar to std::path::Path
ones, but here they
work directly upon &str
instead of &OsStr
.
Functionsยง
- dir_
list - Returns an iterator over the files and folders within a directory. Optionally, a wildcard can be specified to filter files by name.
- dir_
walk - Returns an interator over the files within a directory, and all its subdirectories, recursively.
- exe_
path Debug-assertions enabled - Returns a new string with the path of the current EXE file, without the EXE filename, and without a trailing backslash.
- exists
- Returns true if the path exists.
- get_
file_ name - Extracts the file name from a full path, if any.
- get_
path - Extracts the full path, but the last part.
- has_
extension - Tells whether the full path ends in one of the given extensions, case-insensitive.
- is_
directory - Returns true if the path is a directory. Calls
GetFileAttributes
. - is_
hidden - Returns true if the path is hidden. Calls
GetFileAttributes
. - replace_
extension - Replaces the file extension by the given one, returning a new string.
- replace_
file_ name - Replaces the file name by the given one, returning a new string.
- replace_
path - Keeps the file name and replaces the path by the given one, returning a new string.
- rtrim_
backslash - Removes a trailing backslash, if any.
- split_
parts - Returns a
Vec
with each part of the full path.