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 = await session.GetFolderAsync(new Uri("https://server/My Folder/")); IFolder folderDst = await folderSrc.GetParentAsync(); try { await folderSrc.MoveToAsync(folderDst, "My new name", false); } catch (PreconditionFailedException) { Console.WriteLine("The folder with such name already exists and 'overwrite' was 'false'."); }