webdav-client icon indicating copy to clipboard operation
webdav-client copied to clipboard

Add partialUpdateFileContents method

Open ArcticLampyrid opened this issue 1 year ago • 5 comments

This pull request adds a new method called partialUpdateFileContents to the WebDAVClient class. This method allows for updating a remote file with a partial update, which is useful for making changes to a file without having to download and re-upload the entire file.

Moreover, it can be used to implement chunked file uploading.

This will close #303.

ArcticLampyrid avatar Jan 11 '24 09:01 ArcticLampyrid

Awesome PR here! Thanks @ArcticLampyrid. The DAV compliance fetcher is very nice and I imagine will come in super useful in the future.

Some minor items in the PR, like naming etc.

perry-mitchell avatar Feb 25 '24 15:02 perry-mitchell

@ArcticLampyrid Tests failing due to drop in coverage. Would you mind seeing if there are some lines added in this PR that are not covered by tests? And if so, adding coverage for them?

perry-mitchell avatar Feb 25 '24 18:02 perry-mitchell

The decrease in test coverage is expected. This PR adds partialUpdateFileContents which relies on a non-standard extension, and the webdav-server used during testing does not yet support this extension. In my opinion, there is no simple way to add complete tests. The current unit tests only cover the "not support" scenario.

ArcticLampyrid avatar Feb 25 '24 19:02 ArcticLampyrid

Ok. Would you mind then dropping the coverage amounts to match the new values? I'll merge after that and once the tests pass.

perry-mitchell avatar Feb 26 '24 05:02 perry-mitchell

Would you mind then dropping the coverage amounts to match the new values?

Of course, I'd be happy to adjust the coverage amounts to align with the new values.

ArcticLampyrid avatar Feb 26 '24 11:02 ArcticLampyrid

Sorry this took so long to move. Merging.

perry-mitchell avatar Mar 18 '24 17:03 perry-mitchell