Enum SearchPathDirectory

Source
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§

Source§

impl Clone for SearchPathDirectory

Source§

fn clone(&self) -> SearchPathDirectory

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchPathDirectory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<SearchPathDirectory> for NSUInteger

Source§

fn from(directory: SearchPathDirectory) -> Self

Converts to this type from the input type.
Source§

impl Copy for SearchPathDirectory

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.