pub enum SearchPathDirectory {
Show 27 variants Applications, DemoApplications, DeveloperApplications, AdminApplications, Library, Developer, User, Documentation, Documents, CoreServices, AutosavedInformation, Desktop, Caches, ApplicationSupport, Downloads, InputMethods, Movies, Music, Pictures, PrinterDescription, SharedPublic, PreferencePanes, ApplicationScripts, ItemReplacement, AllApplications, AllLibraries, Trash,
}
Expand description

Represents a type of search path to use.

This enum is particularly useful for applications that need to exist both inside and outside of the sandbox. For example: SearchPathDirectory::Documents will find the standard Documents directory outside of the sandbox, but use the sandbox Documents directory in sandboxed applications.

Variants

Applications

The applications folder.

DemoApplications

Unsupported applications and demo versions. Not generally used these days.

DeveloperApplications

Developer applications (/Developer/Applications). Not generally used these days.

AdminApplications

System and network admin apps.

Library

User-visible docs, support, and config files.

Developer

Dev resources. (/Developer)

User

User home directories. (/Users)

Documentation

Documentation.

Documents

Documents directory.

CoreServices

Core Services (/System/Library/CoreServices)

AutosavedInformation

User’s autosaved documents (/Library/Autosave Information)

Desktop

The current user’s Desktop directory.

Caches

Discardable cache files. (/Library/Caches)

ApplicationSupport

App support files (/Library/Application Support)

Downloads

The curent user’s Downloads directory.

InputMethods

Input methods (/Library/Input Methods)

Movies

The current user’s Movies directory.

Music

The current user’s Music directory.

Pictures

The current user’s pictures directory.

PrinterDescription

System PPD files (/Library/Printers/PPDs)

SharedPublic

The current user’s public sharing directory.

PreferencePanes

The Preferences Pane directory, where system preferences files live. (/Library/PreferencePanes)

ApplicationScripts

The user scripts folder for the calling application (~/Library/Application Scripts/).

ItemReplacement

Constant used in creating a temp directory.

AllApplications

All directories where apps can be stored.

AllLibraries

All directories where resources can be stored.

Trash

The Trash directory.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.