Required Instance Methodswift-nio 2.72.0_NIOFileSystem

    moveItem(at:to:)

    Moves the file or directory at the specified path to a new location.

    FileSystemProtocol.swift:282
    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    func moveItem(at sourcePath: FilePath, to destinationPath: FilePath) async throws

    Parameters

    sourcePath

    The path to the item to move.

    destinationPath

    The path at which to place the item.

    The following error codes may be thrown:

    • notFound if the item at sourcePath does not exist,

    • invalidArgument if an item at destinationPath exists prior to the copy or its parent directory does not exist.

    Note that other errors may also be thrown.

    If the file at sourcePath is a symbolic link then only the link is moved to the new path.

    See also

    Other requirements

    Type members

    Instance members