We will start with a simple directory based overview of the WebDAV server project.
Path | Description |
---|---|
api |
API documentation |
articles |
The articles for the documentation |
docs |
The compiled documentation |
images |
Images for the documentation |
src |
The source code |
src/FubarDev.WebDavServer |
The core WebDAV server assembly |
src/FubarDev.WebDavServer.FileSystem.DotNet |
A file system for the WebDAV server using System.IO |
src/FubarDev.WebDavServer.FileSystem.InMemory |
A file system for the WebDAV server storing all data in memory only |
src/FubarDev.WebDavServer.FileSystem.SQLite |
A file system for the WebDAV server storing all data in a SQLite database |
src/FubarDev.WebDavServer.Locking.InMemory |
A ILockManager implementation that holds its locks only in memory |
src/FubarDev.WebDavServer.Locking.SQLite |
An ILockManager implementation that holds its locks only in an SQLite database |
src/FubarDev.WebDavServer.Props.Store.InMemory |
A property store implementation that holds all dead properties in memory only |
src/FubarDev.WebDavServer.Props.Store.TextFile |
A property store implementation that stores the dead properties in a JSON text file |
src/FubarDev.WebDavServer.Props.Store.SQLite |
A property store implementation that stores the dead properties in an SQLite database |
src-doc |
Project files for docfx |
test |
Test projects |
third-party |
Third party library |
tools |
binary tools directory |
webdav-docs |
WebDAV specifications |
Namespace | Description |
---|---|
FubarDev.WebDavServer | Common interfaces and classes of global interest |
FubarDev.WebDavServer.Dispatchers | WebDAV class interfaces and dispatchers to their handlers |
FubarDev.WebDavServer.Engines | Some commonly used engines. The only one here is currently RecursiveExecutionEngine. |
FubarDev.WebDavServer.FileSystem | The interfaces and classes for the underlying file system support |
FubarDev.WebDavServer.Formatters | The formatter for WebDAV XML responses |
FubarDev.WebDavServer.Handlers | The interfaces for the handlers of the HTTP WebDAV methods |
FubarDev.WebDavServer.Handlers.Impl | The default implementations of the interfaces for the handlers of the HTTP WebDAV methods |
FubarDev.WebDavServer.Locking | The interfaces and classes the LOCK /UNLOCK support for WebDAV |
FubarDev.WebDavServer.Model | The model for the WebDAV XML messages |
FubarDev.WebDavServer.Model.Headers | The model for the WebDAV HTTP headers |
FubarDev.WebDavServer.Props | The interfaces and classes for the underlying WebDAV property support |
FubarDev.WebDavServer.Props.Converters | The interfaces and classes for WebDAV property converters that support conversion between a given value and an XElement |
FubarDev.WebDavServer.Props.Dead | The interfaces and classes for the support of dead properties |
FubarDev.WebDavServer.Props.Filters | Filters for properties used by the PROPFIND implementation |
FubarDev.WebDavServer.Props.Generic | Implementations of generic typed WebDAV properties |
FubarDev.WebDavServer.Props.Live | The interfaces and classes for the support of live properties |
FubarDev.WebDavServer.Props.Store | The interfaces and classes for the a storage of dead properties (and EntityTag) |
FubarDev.WebDavServer.Utils | Utility classes |
A file system implementation starts with a IFileSystemFactory. It's used to create an instance of an IFileSystem for a given user.
The file system consists of a root ICollection which contains child ICollections and IDocuments. Both inherit from a common interface IEntry.
WebDAV knows two types of properties, live and dead properties. The dead properties must be stored using a IPropertyStore. The property store is created using the IPropertyStoreFactory for a given IFileSystem.
Every property should at least implement ILiveProperty or IDeadProperty. That a dead property isn't writeable is a design decision to allow storing an entity tag as dead property too.
The [ITypedReadableProperty1](xref:FubarDev.WebDavServer.Props.ITypedReadableProperty
1) and
[ITypedWriteableProperty1](xref:FubarDev.WebDavServer.Props.ITypedWriteableProperty
1) interfaces are convenience
interfaces that allow accessing the dead property value without the need to handle all the XML fluff.
The locking functionality consists of the following main parts:
-
ILockManager
This is the interface used to manage WebDAV locks. It ensures that lock conflicts are detected and stored.
-
ILock
This is the base interface for all lock related information. It's implemented by both the Lock and IActiveLock classes.
-
Lock
This is the class that contains all information about a lock that the caller wants to create. It's created by a
LOCK
request or any other request that creates an implicit lock. -
IActiveLock
This interface contains all information about an active lock, like e.g. the state token, the time this lock was issued and when it expires.
The RFC4918 specification, section 4.4 explicitly states that it's not possible to define the same property twice on a single resource. This means, that xml:lang isn't used to provide multi-language translations. Instead, it's just an indicator for the language of the properties value.
The xml:lang
property is handled in the following way:
- Live properties never return an
xml:lang
- The
getetag
property never returns anxml:lang
- The
getcontenttype
, andgetcontentlanguage
may return anxml:lang
even though it doesn't make sense for them - The
xml:lang
attribute of a dead property element has precedence over thexml:lang
property of theDAV:props
element - A
PROPFIND
doesn't usexml:lang
at all - A
PROPPATCH
set
respects the transmittedxml:lang
- A
PROPPATCH
remove
doesn't usexml:lang