Bookmark
public final class Bookmark : Codable
extension Bookmark: Hashable
A bookmark represents a file located outside of the app’s own storage space. It is used to reference sound font files without making a copy of them. However there are risks involved, namely that the bookmark may not resolve to a real file.
-
The custom coding keys for a bookmark encoding
See moreDeclaration
Swift
enum CodingKeys : String, CodingKey -
The name of the sound font represented by the bookmark
Declaration
Swift
public let name: String -
Undocumented
Declaration
Swift
public private(set) var bookmark: Data? { get } -
Undocumented
Declaration
Swift
public let original: URL -
Construct a new bookmark
Declaration
Swift
public init(url: URL, name: String)Parameters
urlthe file to bookmark
namethe name to associate with the bookmark
-
Restore bookmark from Core Data values
Declaration
Swift
public init(name: String, original: URL, bookmark: Data?) -
Attempt to reconstitute a bookmark from an encoded container
Throws
throws exception if unable to decode from containerDeclaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderthe container to read from
-
The resolved URL of the bookmark. Note well that this may not point to a valid file if the file has moved or is not available.
Declaration
Swift
public var url: URL { get } -
Determine the availability state for a bookmarked URL
Declaration
Swift
public var isAvailable: Bool { get } -
Determine if the file is located in an iCloud container
Declaration
Swift
public var isUbiquitous: Bool { get } -
The various iCloud states a bookmark item may be in.
See moreDeclaration
Swift
public enum CloudState -
Obtain the current iCloud state of the bookmark item
Declaration
Swift
public var cloudState: CloudState { get } -
Provide a hash for a bookmark. Relies on the bookmark hash value.
Declaration
Swift
public func hash(into hasher: inout Hasher)Parameters
hasherthe object to hash into
-
Allow comparison operator for bookmarks
Declaration
Swift
public static func == (lhs: Bookmark, rhs: Bookmark) -> BoolParameters
lhsfirst argument to compare
rhssecond argument to compare
Return Value
true if they are the same
View on GitHub
Bookmark Class Reference