Function bp3d_os::fs::show

source ·
pub fn show<T: AsRef<Path>>(path: T) -> Result<PathUpdate<T>>
Available on crate feature fs only.
Expand description

Shows the given path in the current platform’s file explorer.

Platform specific behavior

  • On Unix, this function removes the ‘.’ prefix from the given path and returns Changed if it does have it. If the path does not already has the prefix, the function returns Unchanged.

  • On Windows, this function calls GetFileAttributesW and SetFileAttributesW and removes the FILE_ATTRIBUTE_HIDDEN attribute. Because windows uses file attributes to define if a file should be visible, the function always returns Unchanged.

Arguments

  • path: the path to convert.

returns: Result<(), Error>

Errors

Returns an Error if the path couldn’t be un-hidden.