Function winsafe::SHGetKnownFolderPath
source · pub fn SHGetKnownFolderPath(
folder_id: &KNOWNFOLDERID,
flags: KF,
token: Option<&HACCESSTOKEN>
) -> HrResult<String>
Available on crate feature
shell
only.Expand description
SHGetKnownFolderPath
function.
§Examples
Retrieving documents folder:
use winsafe::{self as w, prelude::*, co};
let docs_folder = w::SHGetKnownFolderPath(
&co::KNOWNFOLDERID::Documents,
co::KF::DEFAULT,
None,
)?;
println!("Docs folder: {}", docs_folder);