Initializer

init(symbolicLinkWithDestination:)

Initializes the receiver as a symbolic-link file wrapper.

Declaration

convenience init(symbolicLinkWithDestination path: String)

Parameters

node

Pathname the receiver is to represent.

Return Value

Initialized symbolic-link file wrapper referencing node.

Discussion

The receiver is not associated to a file-system node until you save it using write(toFile:atomically:updateFilenames:). It’s also initialized with open permissions; anyone can read or write the disk representations it saves.

Special Considerations

Beginning with OS X v10.6, the preferred method of referring to files is with a file:// URL. Therefore, this method has been deprecated in favor of init(symbolicLinkWithDestinationURL:).

See Also

Creating File Wrappers

init(url: URL, options: FileWrapper.ReadingOptions)

Initializes a file wrapper instance whose kind is determined by the type of file-system node located by the URL.

init?(path: String)

Initializes a file wrapper instance whose kind is determined by the type of file-system node located by the path.

Deprecated
init(directoryWithFileWrappers: [String : FileWrapper])

Initializes the receiver as a directory file wrapper, with a given file-wrapper list.

init(regularFileWithContents: Data)

Initializes the receiver as a regular-file file wrapper.

init(symbolicLinkWithDestinationURL: URL)

Initializes the receiver as a symbolic-link file wrapper that links to a specified file.

init?(serializedRepresentation: Data)

Initializes the receiver as a regular-file file wrapper from given serialized data.