Constants
All constants are accessible through the callback.DAVSDK.Constants class.
Success.
File or directory not found.
Path or parent not found.
Property not found.
Access Denied. Used to signal insufficient permissions for item access.
Invalid item handle. Used to signal an invalid value in various *Context and *Handle parameters. Can be returned by both the component's methods and application event handlers.
The operation of writing the data to the backend storage has failed or has been denied by the storage.
The operation of reading the data from the backend storage has failed or has been denied by the storage.
General failure. The reason for the failure could not be determined.
Lock violation. When reported by an event handler, should be used when the file is locked and the operation is not possible due to this lock.
A password is missing or incorrect. Returned by the component in the REST API when an access is attempted to a share that is password-protected, but a password is either missing or incorrect.
Invalid parameter. When returned by the component's method, indicates an unacceptable value of one of the parameters (please refer to the exception message for additional details). When reported by an event handler, should be used only to signal logical errors in the code (e.g. a negative position passed by the component during file reading/writing) and not to communicate something that an event handler cannot handle temporarily or permanently, e.g. due to the backend's limits or some external state.
The requested operation is either not implemented by an application or has been disabled using the properties and settings.
The directory being deleted contains files or subdirectories, and recursive deletion was not requested.
A Lock or Unlock operation failed.
An item already exists. When reported by an event handler, should be used to indicate that the operation such as creation, moving, or copying of the item cannot be accomplished because at the destination, there already exists an item with the given name or Id.
An item cannot be moved, deleted, or written to because it is read-only.
An operation has been aborted on the transport level (e.g. due to the premature closing of a socket by the client).
A catch-all error code that can be used to tell the component that a backend filesystem operation has failed.
A user with the given username could not be found.
An upload or download operation was blocked by the application, likely due to invalid content.
The HTTP request contained conditions (such as modification period, range of data in a file, or etag) that could not be satisfied.
The file or directory is being deleted.
The file or directory is being renamed.
Renaming doesn't involve opening of a file for reading and is performed within the same directory.
The file or directory is being moved.
The event is fired for a source file or directory.
A separate event is also fired for a destination directory with the ACCESS_TYPE_WRITE flag.
The file is being opened for reading or for reading and writing.
The file is being opened for writing or for reading and writing.
For directories, this value means that a new file is about to be created in the directory or be moved into the directory.
The directory is being enumerated.
Information about the file or directory is requested.
An explicit operation of changing file times and attributes is performed.
A human-readable path or a file's parent are being requested.
Use this check to provide access to a specific file or directory and prevent its parent directories from becoming known to a user.
A request is made to get a filename.
No required sort order.
A handler is free to use any ordering, given that the sorting algorithm remains unchanged between calls.
Sort by human-readable name and item attributes.
Directories should come in the list before files, and both files and directories should be sorted according their human-readable names, lexicographically.
In recursive enumerations, an entity that resides in the subdirectory must come later than the subdirectory but before files that reside in the parent of that subdirectory.
Sort by human-readable name, lexicographically.
Use common string comparison to match item names.
Sort by item size, then by human-readable name.
Sort by item modification time, then by human-readable name.
Sort by item creation time, then by human-readable name.
The item is a file.
The item is a directory.
The file is read-only.
DAVServer does not block operations based on this attribute, but it does communicate the status of items and directories to clients based on this attribute.
A mask which includes any and all attributes.
Access for reading.
Access for writing.
Access for reading and writing.
Create a new file, fail if a file exists.
The file should be opened for writing when this flag is used, but the AccessMode parameter may also specify the need for read access.
If a file exists, truncate it, otherwise create a new file.
The file should be opened for writing when this flag is used, but the AccessMode parameter may also specify the need for read access.
If a file exists, open it, otherwise return an error.
Use the AccessMode parameter to determine whether the file is to be opened for reading, writing, or both.
If a file exists, open it, otherwise create a new file.
Use the AccessMode parameter to determine whether the file is to be opened for reading, writing, or both.
Item existence is checked.
This pseudo-flag with the numeric value 0 is used when the GetFileInfo event is used to check whether the given item exists.
When the RequestedInfo parameter is 0, no file or directory information needs to be returned, and just an error should be reported if the item does not exist.
Item name is requested.
The parent of the item is requested.
File size is requested.
If an item is a directory, set the corresponding parameter to 0.
Attributes are requested.
If the component needs to find out whether the item is a file or a directory, this flag will be the only one set.
During other requests, it may come in a combination with other flags.
Times are requested.
The owner of the file is requested.
An existing file may not be overwritten.
An existing file should be overwritten.
A file should be written with a different name.
If an item Id includes a file name and a file exists, then the name in the Id should be updated accordingly to reflect the name with which the item was created or stored.
Error Codes
DAVSDK_ERR_OK
Value: 0
DAVSDK_ERR_FILE_NOT_FOUND
Value: 2
DAVSDK_ERR_PATH_NOT_FOUND
Value: 3
DAVSDK_ERR_PROPERTY_NOT_FOUND
Value: 4
DAVSDK_ERR_ACCESS_DENIED
Value: 5
DAVSDK_ERR_INVALID_HANDLE
Value: 6
DAVSDK_ERR_WRITE_FAULT
Value: 29
DAVSDK_ERR_READ_FAULT
Value: 30
DAVSDK_ERR_GENERAL_FAILURE
Value: 31
DAVSDK_ERR_LOCK_VIOLATION
Value: 33
DAVSDK_ERR_INVALID_PASSWORD
Value: 86
DAVSDK_ERR_INVALID_PARAMETER
Value: 87
DAVSDK_ERR_NOT_IMPLEMENTED
Value: 120
DAVSDK_ERR_DIR_NOT_EMPTY
Value: 145
DAVSDK_ERR_LOCK_FAILED
Value: 167
DAVSDK_ERR_ALREADY_EXISTS
Value: 183
DAVSDK_ERR_ITEM_READONLY
Value: 348
DAVSDK_ERR_OPERATION_ABORTED
Value: 995
DAVSDK_ERR_DISK_OPERATION_FAILED
Value: 1127
DAVSDK_ERR_USER_NOT_FOUND
Value: 1253
DAVSDK_ERR_CONTENT_BLOCKED
Value: 1296
DAVSDK_ERR_CONDITION_NOT_SATISFIED
Value: 3060
Desired Operation Values
ACCESS_TYPE_DELETE
Value: 0x00000001
ACCESS_TYPE_RENAME
Value: 0x00000002
ACCESS_TYPE_MOVE
Value: 0x00000004
ACCESS_TYPE_READ
Value: 0x00000008
ACCESS_TYPE_WRITE
Value: 0x00000010
ACCESS_TYPE_ENUMERATE
Value: 0x00000020
ACCESS_TYPE_GET_ATTR
Value: 0x00000040
ACCESS_TYPE_SET_ATTR
Value: 0x00000080
ACCESS_TYPE_BUILD_PATH
Value: 0x00002000
ACCESS_TYPE_GET_FILENAME
Value: 0x00008000
Sort Order
SORT_ORDER_NONE
Value: 0x00000000
SORT_ORDER_NAME_FS
Value: 0x00000002
The following example helps demonstrate this idea.
\Dir
\Dir\Z.txt
\A_File.bin
SORT_ORDER_NAME_LEX
Value: 0x00000003
SORT_ORDER_SIZE
Value: 0x00000004
SORT_ORDER_MODIFICATION_TIME
Value: 0x00000005
SORT_ORDER_CREATION_TIME
Value: 0x00000006
Item Attributes
ITEM_ATTR_FILE
Value: 0x00000001
ITEM_ATTR_DIRECTORY
Value: 0x00000002
ITEM_ATTR_READONLY
Value: 0x00000040
ITEM_ATTR_ANY_FILE
Value: 0x7FFFFFFF
File Access Modes
FILE_ACCESS_READ
Value: 0x00000001
FILE_ACCESS_WRITE
Value: 0x00000002
FILE_ACCESS_READWRITE
Value: 0x00000003
File Open Modes
FILE_OPEN_CREATE_NEW
Value: 0x00000000
FILE_OPEN_CREATE_ALWAYS
Value: 0x00000001
FILE_OPEN_OPEN_EXISTING
Value: 0x00000002
FILE_OPEN_OPEN_ALWAYS
Value: 0x00000003
Requested Information Flags
ITEM_INFO_EXISTENCE
Value: 0x00000000
ITEM_INFO_NAME
Value: 0x00000001
ITEM_INFO_PARENTID
Value: 0x00000002
ITEM_INFO_SIZE
Value: 0x00000008
ITEM_INFO_ATTR
Value: 0x00000010
ITEM_INFO_TIMES
Value: 0x00000020
ITEM_INFO_OWNER
Value: 0x00000040
Conflict Resolution values
CONFLICT_RES_FAIL
Value: 0x00000000
CONFLICT_RES_REPLACE
Value: 0x00000001
CONFLICT_RES_RENAME
Value: 0x00000002