Instance Property

isAbsolutePath

A Boolean value that indicates whether the receiver represents an absolute path.

Declaration

var isAbsolutePath: Bool { get }

Discussion

true if the receiver (if interpreted as a path) represents an absolute path, otherwise false.

See String Programming Guide for more information on paths.

Note that this method only works with file paths (not, for example, string representations of URLs). The method does not check the filesystem for the existence of the path (use fileExists(atPath:) or similar methods in FileManager for that task).