Instance Method


Returns an NSString object whose contents are derived from the specified C-string path.


func string(withFileSystemRepresentation str: UnsafePointer<Int8>, length len: Int) -> String



A C string representation of a pathname.


The number of characters in string.

Return Value

An NSString object converted from the C-string representation string with length len of a pathname in the current file system.


Use this method if your code receives paths as C strings from system routines.

See Also

Converting File Paths to Strings

func fileSystemRepresentation(withPath: String) -> UnsafePointer<Int8>

Returns a C-string representation of a given path that properly encodes Unicode strings for use by the file system.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software