webdav-handler-rs icon indicating copy to clipboard operation
webdav-handler-rs copied to clipboard

How to handle PUT?

Open TheRadioGuy opened this issue 4 years ago • 2 comments

Hi there! First of all, thanks for your crate!

I'm making my own FS for my project. How can I handle PUT with this trait ?

TheRadioGuy avatar Jul 02 '20 06:07 TheRadioGuy

Basically that trait (and the other ones in fs) mirror the functions from std::fs in the Rust standard library. PUT is open + write, so you need to implement DavFileSystem::open. But open returns a DavFile, so you need to implement that as well.

miquels avatar Jul 08 '20 23:07 miquels

Thanks for answer! I still don't get it. So, I need to upload 1 file. How many times will be write_bytes / write_buf called?

TheRadioGuy avatar Jul 10 '20 07:07 TheRadioGuy