1.7 KiB
1.7 KiB
WebDAV Property Model
This file implements the WebDAV property model as defined in RFC 4918. It provides a set of property types that represent various WebDAV properties used in PROPFIND and PROPPATCH operations.
Overview
The model_property.v file defines:
- A
Propertyinterface that all WebDAV properties must implement - Various property type implementations for standard WebDAV properties
- Helper functions for XML serialization and time formatting
Property Interface
pub interface Property {
xml() string
xml_name() string
}
All WebDAV properties must implement:
xml(): Returns the full XML representation of the property with its valuexml_name(): Returns just the XML tag name of the property (used in property requests)
Property Types
The file implements the following WebDAV property types:
| Property Type | Description |
|---|---|
DisplayName |
The display name of a resource |
GetLastModified |
Last modification time of a resource |
GetContentType |
MIME type of a resource |
GetContentLength |
Size of a resource in bytes |
ResourceType |
Indicates if a resource is a collection (directory) or not |
CreationDate |
Creation date of a resource |
SupportedLock |
Lock capabilities supported by the server |
LockDiscovery |
Active locks on a resource |
Helper Functions
fn (p []Property) xml() string: Generates XML for a list of propertiesfn format_iso8601(t time.Time) string: Formats a time in ISO8601 format for WebDAV
Usage
These property types are used when responding to WebDAV PROPFIND requests to describe resources in the WebDAV server.