Expose a bit more information about needed file in REST interface

This commit is contained in:
Jakob Borg 2014-03-29 14:58:44 +01:00
parent f87b1520e8
commit 1139ea2c81

View File

@ -119,12 +119,16 @@ type guiFile scanner.File
func (f guiFile) MarshalJSON() ([]byte, error) {
type t struct {
Name string
Size int64
Name string
Size int64
Modified int64
Flags uint32
}
return json.Marshal(t{
Name: f.Name,
Size: scanner.File(f).Size,
Name: f.Name,
Size: scanner.File(f).Size,
Modified: f.Modified,
Flags: f.Flags,
})
}