Function

NSTemporaryDirectory()

Returns the path of the temporary directory for the current user.

Declaration

func NSTemporaryDirectory() -> String

Return Value

A string containing the path of the temporary directory for the current user.

Discussion

See the FileManager method url(for:in:appropriateFor:create:) for the preferred means of finding the correct temporary directory.

For more information about temporary files, see File System Programming Guide.

See Also

File Path Functions

func NSFullUserName() -> String

Returns a string containing the full name of the current user.

func NSHomeDirectory() -> String

Returns the path to either the user’s or application’s home directory, depending on the platform.

func NSHomeDirectoryForUser(String?) -> String?

Returns the path to a given user’s home directory.

func NSOpenStepRootDirectory() -> String

Returns the root directory of the user’s system.

func NSUserName() -> String

Returns the logon name of the current user.