Hi > -----Original Message----- > From: Shah, Kalpesh [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 10:17 PM > To: [EMAIL PROTECTED] > Subject: Create New file. > > > Hi, > > Is there a way in slide client by which I can specify to > create a new file. It should throw an > exception or return false if file already exists. > > I want to create a file as it is in java.io.File, which will > return false if file already exists.
Don't know about the API, but if you are using WebDAV I think the algorithm must be: 1) LOCK /a/b/foo This will create a lock-null resource named "foo" if the resource does not exist or lock "foo" if it exists 2) HEAD or GET resource /a/b/foo This will test if resource "foo" exists 3) a) if "foo" exists: UNLOCK /a/b/foo and error b) if "foo" does not exist: PUT /a/b/foo and UNLOCK /a/b/foo This will require a class 2 server, e.g. a server that supports locks. I would like to know if there exists a simpler way!? olli -- Ceyoniq Technology -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
