Class ITHit.WebDAV.Client.Folder

Extends ITHit.WebDAV.Client.HierarchyItem

class ITHit.WebDAV.Client.Folder
Represents a folder in a WebDAV repository.
Defined in ITHitWebDAVClient.js

Properties inherited from ITHit.WebDAV.Client.HierarchyItem

Function Summary
ITHit.ITHit.WebDAV.Client.Folder CreateFolder(String sName, [String sLockToken])
Creates new folder with specified name as child of ITHit.WebDAV.Client.Folder one.
ITHit.WebDAV.Client.LockInfo CreateLockNull(String sNewItemName, String sLockScope, Boolean bDeep, String sOwner, Integer iTimeout)
Locks name for later use.
ITHit.ITHit.WebDAV.Client.Folder CreateResource(String sName, [String sLockToken], [String sContent])
Creates new resource with specified name as child of ITHit.WebDAV.Client.Folder one.
Array GetChildren([Boolean bRecurcively])
Returns children of ITHit.WebDAV.Client.Folder folder.
Gets the specified folder from server.
Gets the specified item from server.
Gets the specified resource from server.
Boolean ItemExists(String sName)
Checks whether specified item exists in the folder.

Functions inherited from ITHit.WebDAV.Client.HierarchyItem

Function Details

function CreateFolder

ITHit.ITHit.WebDAV.Client.Folder CreateFolder(String sName, [String sLockToken])
Creates new folder with specified name as child of ITHit.WebDAV.Client.Folder one.
Parameters:
sName Name of the new folder.
sLockToken (optional) Lock token for ITHit.WebDAV.Client.Folder folder.
Returns:
Created folder object.
Throws:
ITHit.WebDAV.Client.Exceptions.MethodNotAllowedException Item with specified name already exists.
ITHit.WebDAV.Client.Exceptions.ForbiddenException Creation of child items not allowed.
ITHit.WebDAV.Client.Exceptions.NotFoundException  This folder doesn't exist on the server.
ITHit.WebDAV.Client.Exceptions.LockedException This folder is locked and no or invalid lock token was specified.

function CreateLockNull

ITHit.WebDAV.Client.LockInfo CreateLockNull(String sNewItemName, String sLockScope, Boolean bDeep, String sOwner, Integer iTimeout)
Locks name for later use.
Parameters:
sNewItemName Name of new item.
sLockScope Scop of the lock.
bDeep Whether to lock entire subtree.
sOwner Owner of the lock.
iTimeout TimeOut after which lock expires.
Returns:
Instance of LockInfo object with information about created lock.
Throws:
ITHit.WebDAV.Client.Exceptions.NotFoundException This folder doesn't exist on the server.(Server in fact returns Conflict)
ITHit.WebDAV.Client.Exceptions.LockedException This folder is locked and no or invalid lock token was specified.
ITHit.WebDAV.Client.Exceptions.ForbiddenException The client, for reasons the server chooses not to specify, cannot apply the lock.

function CreateResource

ITHit.ITHit.WebDAV.Client.Folder CreateResource(String sName, [String sLockToken], [String sContent])
Creates new resource with specified name as child of ITHit.WebDAV.Client.Folder one.
Parameters:
sName Name of the new folder.
sLockToken (optional) Lock token for current folder.
sContent (optional) File content.
Returns:
Created resource object.
Throws:
ITHit.WebDAV.Client.Exceptions.ForbiddenException Creation of child items not allowed.
ITHit.WebDAV.Client.Exceptions.NotFoundException This folder doesn't exist on the server.
ITHit.WebDAV.Client.Exceptions.LockedException This folder is locked and no or invalid lock token was specified.

function GetChildren

Array GetChildren([Boolean bRecurcively])
Returns children of ITHit.WebDAV.Client.Folder folder.
Parameters:
bRecurcively (optional) Indicates if all subtree of children should be returnd. Default is false.
Returns:
Array of resource or folder objects.
Throws:
ITHit.WebDAV.Client.Exceptions.NotFoundException This folder doesn't exist on the server.

function GetFolder

ITHit.WebDAV.Client.Folder GetFolder(String sName)
Gets the specified folder from server.
Parameters:
sName Name of the folder.
Returns:
Folder object corresponding to requested path.
Throws:
ITHit.WebDAV.Client.Exceptions.UnauthorizedException Incorrect credentials provided or insufficient permissions to access the requested item.
ITHit.WebDAV.Client.Exceptions.NotFoundException The requested folder doesn't exist on the server.
ITHit.WebDAV.Client.Exceptions.ForbiddenException The server refused to fulfill the request.

function GetItem

ITHit.WebDAV.Client.HierarchyItem GetItem(String sName)
Gets the specified item from server.
Parameters:
sName Name of folder or resource.
Returns:
Item object corresponding to requested path.
Throws:
ITHit.WebDAV.Client.Exceptions.UnauthorizedException Incorrect credentials provided or insufficient permissions to access the requested item.
ITHit.WebDAV.Client.Exceptions.NotFoundException The requested folder doesn't exist on the server.
ITHit.WebDAV.Client.Exceptions.ForbiddenException The server refused to fulfill the request.

function GetResource

ITHit.WebDAV.Client.Resource GetResource(String sName)
Gets the specified resource from server.
Parameters:
sName Name of the resource.
Returns:
Resource corresponding to requested path.
Throws:
ITHit.WebDAV.Client.Exceptions.UnauthorizedException Incorrect credentials provided or insufficient permissions to access the requested item.
ITHit.WebDAV.Client.Exceptions.NotFoundException The requested resource doesn't exist on the server.
ITHit.WebDAV.Client.Exceptions.ForbiddenException The server refused to fulfill the request.

function ItemExists

Boolean ItemExists(String sName)
Checks whether specified item exists in the folder.
Parameters:
sName Name of the folder.
Returns:
True, if specified item exists; false, otherwise.