[Zope-dev] WebDAV API
Jeffrey P Shell
jeffrey@cuemedia.com
Thu, 1 Nov 2001 17:29:05 -0700
On Thursday, November 1, 2001, at 05:20 PM, Dethe Elza wrote:
> Because many existing Windows programs understand FTP but not
> WebDAV, we're trying to create an alternative way to lock/unlock
> files when we FTP them. This could be a simple HTTP call
> (preferred) or XML-RPC. The documentation I've been able to dig up
> on Zope's DAV implementation isn't too clear on how to
> programmatically lock/unlock files.
>
> I can easily check if a file is locked using DTML Methods, but
> actually locking it has eluded me. Do I have to create a Lock
> object first? At first wl_lockItems, wl_lockTokens, and
> wl_getLock all looked like methods to create a lock, but they seem
> to be methods for retrieving existing locks, wl_setLock seems to
> be what I want but I don't see how to create a token or a lock
> item. Can I do this in a DTML Method?
When the WebDAV writelocking project was in its early stages, some
debate went to whether the locking mechanism should be exposed to a
higher level, and what that mechanism would be. Ultimately,
however, it was decided that WebDAV writelocking would be kept
entirely within the WebDAV system. It's not recommended that you
try to use these outside of that, primarily due to the importance
of the 'locktoken' objects, which you need to understand in order
to use wl_setLock() and other methods.
Jeffrey P Shell, jeffrey@cuemedia.com