apple/swift-nio

NIOFileSystem: provide a function that copies or replaces a file/dir

Open

#3,403 opened on Oct 12, 2025

View on GitHub
 (8 comments) (0 reactions) (0 assignees)Swift (8,453 stars) (749 forks)batch import
good first issuekind/enhancementsize/S

Description

Usually, when copying a file, I don't hugely mind if it already exists. If it does, I want to overwrite it.

NIO FS currently provides copyItem (fails if dest already exists) and replaceItem (fails if dest does not already exist). This makes for pretty awkward code if you want to do it correctly.

Contributor guide

NIOFileSystem: provide a function that copies or replaces a file/dir · apple/swift-nio#3403 | Good First Issue