Closed BommerG closed 4 months ago
from webdav4.client import Client
client = Client(...)
client.request("lock", path)
client.request("unlock", path)
There are no methods exposed to lock/unlock a resource. But I think the above snippet should work(?)
You can also bypass client
and use http.lock
and http.unlock
primitives.
client = Client(...)
client.http.lock(client.join_url(path))
client.http.unlock(client.join_url(path))
It is working. Thank you very much.
WebDAV is not straight forward, but the RFC was a great help.
Hi, we store a KeePass database on webdav (apache with mod_dav). now I want write a script that can add/remove entries from the KeePass database. because this script can be execute by multiple clients, I have to lock the KeePass database during updates to avoid losing data. I was looking through the code of webdav4. I can see that webdav4 can detect locked files, but I can't see how I can lock/unlock a file myself. Kind regards Boomer