Instance Method

getFileSystemRepresentation(_:maxLength:)

Fills the provided buffer with a C string representing a local file system path.

Declaration

func getFileSystemRepresentation(_ buffer: UnsafeMutablePointer<Int8>, maxLength maxBufferLength: Int) -> Bool

Parameters

buffer

A buffer large enough to hold the path. On return, contains a null-terminated C string in file system representation.

maxBufferLength

The size of buffer in bytes (typically MAXPATHLEN or PATH_MAX).

Return Value

Returns true if the URL could be converted into a file system representation, otherwise false.

Discussion

The file system representation format is described in File Encodings and Fonts.