Structure

FileManager.ItemReplacementOptions

Options for specifying the behavior of file replacement operations.

Declaration

struct ItemReplacementOptions

Overview

Topics

Using File Replacement Options

init(rawValue: UInt)

Creates a value for a file replacement operation.

static var usingNewMetadataOnly: FileManager.ItemReplacementOptions

Only metadata from the new item is used, and metadata from the original item isn’t preserved (default).

static var withoutDeletingBackupItem: FileManager.ItemReplacementOptions

The backup item remains in place after a successful replacement.

Relationships

Conforms To

See Also

Replacing Items

func replaceItemAt(URL, withItemAt: URL, backupItemName: String?, options: FileManager.ItemReplacementOptions) -> URL?

Replaces the contents of the item at the specified URL in a manner that ensures no data loss occurs.