mirror of
https://github.com/apple/swift-nio.git
synced 2026-05-20 20:30:36 +00:00
be8fdc13c0
Adds capability to NIOFS to copy regular files and symlink, allowing to overwrite the destination. ### Motivation: Per https://github.com/apple/swift-nio/issues/3403 and https://github.com/apple/swift-nio/pull/3470 we want to add `replaceExisting: bool` to `FileSystem.copyItem`. ### Modifications: 1. Adds `replaceExisting: bool` parameter to `FileSystemProtocol.copyItem`. 2. Adds `replaceExisting: bool` parameter to `FileSystem.copyItem` and implementation for regular files and symbolic links. 3. Adds tests. --------- Co-authored-by: George Barnett <gbarnett@apple.com>