diff options
Diffstat (limited to 'xml.tmpl')
-rw-r--r-- | xml.tmpl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/xml.tmpl b/xml.tmpl new file mode 100644 index 0000000..1b67212 --- /dev/null +++ b/xml.tmpl @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" ?> +<D:multistatus xmlns:D="DAV:"> +<D:response> +<D:href>{{ .Href }}</D:href> +<D:propstat> +<D:prop> +<D:displayname>{{ .Name }}</D:displayname> +<D:getlastmodified>{{ .Date }}</D:getlastmodified> +<D:resourcetype><D:collection/></D:resourcetype> +<D:lockdiscovery/> +<D:supportedlock> +</D:supportedlock> +</D:prop> +<D:status>HTTP/1.1 200 OK</D:status> +</D:propstat> +</D:response> +{{range .ListFiles}}<D:response> +<D:href>{{ .Href }}</D:href> +<D:propstat> +<D:prop> +<D:displayname>{{ .DisplayName }}</D:displayname> +<D:getcontentlength>{{ .Size }}</D:getcontentlength> +<D:getlastmodified>{{ .LastModifier }}</D:getlastmodified> +<D:resourcetype>{{ if .IsDir }}<D:collection/>{{end}}</D:resourcetype> +<D:lockdiscovery/> +<D:supportedlock> +</D:supportedlock> +</D:prop> +<D:status>HTTP/1.1 {{ .Status }}</D:status> +</D:propstat> +</D:response> +{{end}} +</D:multistatus> |