This page presents one of the [[Web Application]] services. It describes how to use the WebDAV file system interface.
BaseX offers access to the databases and documents using the [httphttps://en.wikipedia.org/wiki/Webdav WebDAV] protocol. WebDAV provides convenient means to access and edit XML documents by representing BaseX databases and documents in the form of a file system hierarchy.
The implementation in BaseX is based on the [http://milton.io Milton library]. Currently, only Basic Authentication is supported.
=Usage=
By default, the BaseX HTTP server makes the WebDAV service accessible at {{Code|http://localhost:89848080/webdav/}}. If no default credentials are specified, they will be requested by the client ([[Web Application#User Management|see further]]). It can be accessed by either <code>http://<httphost>:<httpport>/webdav/</code> or <code>webdav://<httphost>:<httpport>/webdav/</code>, depending on your WebDAV client.
Please note that the file size of XML documents will be displayed as 0 bytes, as the actual file size can only be determined if the full document is being returned and serialized. This may cause problems with some WebDAV clients (e.g. , NetDrive or WebDrive).
=AuthorizationAuthentication=
The WebDAV service uses the database user credentials in order to perform authentication and authorization. If database A default user and password are explicitly specified when starting can be defined in the BaseX HTTP Server using the corresponding configuration [[Command-Line OptionsWeb Application#BaseX_HTTP_ServerAuthentication|startup optionsas described here]], WebDAV will not request additional user authentication from the client.
=Root Directory=
* 160 (non-breaking space)
* Since {{Version|8.6}}: 8192–8207, 8232–8239, 8287–8303 (see http[https://wwwen.w3schoolswikipedia.comorg/charsetswiki/ref_utf_punctuation.aspGeneral_Punctuation General Punctuation])
==Binary Files==
=Locking=
The BaseX WebDAV implementation supports locking. It can be utilized with clients which support this feature (e.g. [[oXygen|oXygen Editor]]). [httphttps://tools.ietf.org/html/rfc4918#section-6.2 EXCLUSIVE and SHARED] locks are supported, as well as [httphttps://tools.ietf.org/html/rfc4918#section-7 WRITE] locks.
'''Note:''' WebDAV locks are stored in a database called <code>~webdav</code>. If the database is deleted, it will automatically be recreated along with the next lock operations. If a resource remains locked, it can be unlocking by removing the correspondent <code><w:lockinfo></code> entry.