Module winsafe::path

source ·
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§

  • Returns an iterator over the files and folders within a directory. Optionally, a wildcard can be specified to filter files by name.
  • Returns an interator over the files within a directory, and all its subdirectories, recursively.
  • exe_pathDebug-assertions enabled
    Returns a new string with the path of the current EXE file, without the EXE filename, and without a trailing backslash.
  • Returns true if the path exists.
  • Extracts the file name from a full path, if any.
  • Extracts the full path, but the last part.
  • Tells whether the full path ends in one of the given extensions, case-insensitive.
  • Returns true if the path is a directory. Calls GetFileAttributes.
  • Returns true if the path is hidden. Calls GetFileAttributes.
  • Replaces the file extension by the given one, returning a new string.
  • Replaces the file name by the given one, returning a new string.
  • Keeps the file name and replaces the path by the given one, returning a new string.
  • Removes a trailing backslash, if any.
  • Returns a Vec with each part of the full path.