mirror of
https://github.com/apple/swift-nio
synced 2026-11-23 04:34:23 +00:00
Adds the changes from https://github.com/apple/swift-nio/pull/3508 to the `_NIOFileSystem`. ### Motivation: We have added capability to overwrite regular files and symbolic links to `NIOFS` `FileSystem.copyItem` in https://github.com/apple/swift-nio/pull/3508. Now we want to port the same logic to `_NIOFileSystem`. ### Modifications: - Adds a new `FileSystemProtocol.copyItem` requirement with `replaceExisting: bool` parameter along with a default implementation. - Adds an implementation of the new `FileSystemProtocol.copyItem` requirement to `_NIOFileSystem`'s `FileSystem` struct for regular files and symbolic links. ### Notes It seems that the tests for `FileSystem` are only in `NIOFS` - so no tests are added in this PR.