URL
public extension URL
-
File name without extension. Nil if it’s directory.
Declaration
Swift
@available(iOS 9.0, *) var fileName: String? { get }
-
Returns directory URL
Declaration
Swift
@available(iOS 9.0, *) var directory: URL { get }
-
Check if it’s URL to local directory
Declaration
Swift
@available(iOS 9.0, *) var isLocalDirectory: Bool { get }
-
Check if it’s URL to local file
Declaration
Swift
@available(iOS 9.0, *) var isLocalFile: Bool { get }
-
Try to init UIImage from URL to check if this URL points to an image.
Declaration
Swift
@available(iOS 9.0, *) var isImageUrl: Bool { get }
-
Appends path component and prevents double slashes if URL has trailing slash and path component has leading slash.
Declaration
Swift
func smartAppendingPathComponent(_ pathComponent: String, isDirectory: Bool = false) -> URL