Namespace: ITHit.WebDAV.Client
Exception | Condition |
---|---|
NotFoundException | This item doesn't exist on the server. |
WebDavHttpException | Server returned unknown error. |
WebDavException | Unexpected error occurred. |
Renaming Item.
string license = "<?xml version='1.0' encoding='utf... WebDavSession session = new WebDavSession(license); session.Credentials = new NetworkCredential("User1", "pwd"); IFolder folderSrc = session.OpenFolder(new Uri("http://server/My Folder/")); IFolder folderDst = folderSrc.GetParent(); try { folderSrc.MoveTo(folderDst, "My new name", false); } catch (PreconditionFailedException) { Console.WriteLine("The folder with such name already exists and 'overwrite' was 'false'."); }