Trait MediaDirsExt
pub trait MediaDirsExt: Sized
Darwin-specific extensions to fs::MediaDirs.
Required Methods
fn sysdir() -> Result<Self>Load the standard user directory paths for the current user.
The produced directory paths are not guaranteed to be the canonical paths to the directories; they are allowed to be sandbox-redirected paths as long as the directory is accessible there.
The loaded common directories are:
MediaDirsNSSearchPathDirectorydesktopNSDesktopDirectory(~/Desktop)documentsNSDocumentDirectory(~/Documents)downloadsNSDownloadsDirectory(~/Downloads)musicNSMusicDirectory(~/Music)picturesNSPicturesDirectory(~/Pictures)videosNSMoviesDirectory(~/Movies)Errors
Errors if the the user home cannot be determined.
Implementation-specific behavior
Uses the
sysdir(3)API fromlibSystemto discover the standard user directories.This behavior may change in the future. One example change that we explicitly reserve the right to make is to load additional common directories not currently in this list.