Files
zurg/pkg/dav/response.go
Ben Sarmiento 1117e777ff cleanup
2023-10-20 01:27:30 +02:00

28 lines
535 B
Go

package dav
func Directory(path string) Response {
return Response{
Href: customPathEscape(path),
Propstat: PropStat{
Prop: Prop{
ResourceType: ResourceType{Value: "<d:collection/>"},
},
Status: "HTTP/1.1 200 OK",
},
}
}
func File(path string, fileSize int64, added string, link string) Response {
return Response{
Href: customPathEscape(path),
Propstat: PropStat{
Prop: Prop{
ContentLength: fileSize,
CreationDate: added,
LastModified: added,
},
Status: "HTTP/1.1 200 OK",
},
}
}