Closed jwise-mfg closed 1 year ago
Sample code... but it looks like this is a Windows-only feature 👎 in props.go > liveProps
{Space: "DAV:", Local: "creationdate"}: {
findFn: findCreationDate,
dir: false,
},
and as a new method in the same file
func findCreationDate(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) {
d := fi.Sys().(*syscall.Win32FileAttributeData)
cTime = time.Unix(0, d.CreationTime.Nanoseconds())
return fi.CreateTime().UTC().Format(http.TimeFormat), nil
}
Sorry, I'm new to Go, so you probably don't want my advice 😄
Hi,
thanks for the information and thanks for the thanks. ;)
Unfortunately the potentially changes you mentioned comes directly from the golang webdav standard library (props.go comes from golang.org/x/net/webdav) which is instrumented by dave. I see no lightweight possibility to enable more webdav features than given by the library.
Sorry for that.
Would it be possible to implement the creationdate prop element? Its a peer element to getlastmodified, and apparently suggested RFC4437. Not a huge deal (and I actually don't see it in the RFC) but I'm working with an older client that crashed because it was missing (I patched this particular client, but others may have trouble.)
Thanks for building this, its awesome!