mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-10 18:24:44 +00:00
Expose a bit more information about needed file in REST interface
This commit is contained in:
parent
f87b1520e8
commit
1139ea2c81
@ -119,12 +119,16 @@ type guiFile scanner.File
|
|||||||
|
|
||||||
func (f guiFile) MarshalJSON() ([]byte, error) {
|
func (f guiFile) MarshalJSON() ([]byte, error) {
|
||||||
type t struct {
|
type t struct {
|
||||||
Name string
|
Name string
|
||||||
Size int64
|
Size int64
|
||||||
|
Modified int64
|
||||||
|
Flags uint32
|
||||||
}
|
}
|
||||||
return json.Marshal(t{
|
return json.Marshal(t{
|
||||||
Name: f.Name,
|
Name: f.Name,
|
||||||
Size: scanner.File(f).Size,
|
Size: scanner.File(f).Size,
|
||||||
|
Modified: f.Modified,
|
||||||
|
Flags: f.Flags,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user