Instance Method

read(from:options:)

Recursively rereads the entire contents of a file wrapper from the specified location on disk.

Declaration

func read(from url: URL, options: FileWrapper.ReadingOptions = []) throws

Parameters

url

URL of the file-system node corresponding to the file wrapper.

options

Option flags for reading the node located at url. See FileWrapper.ReadingOptions for possible values.

outError

If an error occurs, upon return contains an NSError object that describes the problem. Pass NULL if you do not want error information.

Return Value

true if successful. If not successful, returns false after setting outError to an NSError object that describes the reason why the file wrapper could not be reread.

Discussion

When reading a directory, children are added and removed as necessary to match the file system.

See Also

Updating File Wrappers

func needsToBeUpdated(fromPath: String)

Indicates whether the file wrapper needs to be updated to match a given file-system node.

Deprecated
func matchesContents(of: URL)

Indicates whether the contents of a file wrapper matches a directory, regular file, or symbolic link on disk.

func update(fromPath: String)

Updates the file wrapper to match a given file-system node.

Deprecated