webdav: remove File.Stat, add FileSystem.Stat

References: https://github.com/emersion/go-webdav/issues/15
This commit is contained in:
Simon Ser
2020-01-21 19:55:02 +01:00
parent 6526cef9eb
commit e851e6e3f1
2 changed files with 29 additions and 25 deletions

View File

@@ -31,4 +31,12 @@ func (fs LocalFileSystem) Open(name string) (File, error) {
return os.Open(p)
}
func (fs LocalFileSystem) Stat(name string) (os.FileInfo, error) {
p, err := fs.path(name)
if err != nil {
return nil, err
}
return os.Stat(p)
}
var _ FileSystem = LocalFileSystem("")