WebDAV requires support for the COPY method (defined in RFC 2518 section 8.8). Go's WebDAV server implementation in golang.org/x/net/webdav implements it, however the current implementation simply calls FileSystem.OpenFile on the source and destination and uses io.Copy to pipe the content.
While this is fine in some cases, I really think that the user should be able to override / implement this by adding a CopyFile method to the FileSystem interface. Two major reasons I see:
The current implementation is inefficient on filesystems that support copy-on-write.
The current implementation is inefficient on remote filesystems (effectively, it will pull a file locally and send it back).
The text was updated successfully, but these errors were encountered: