lib/api: Unify JSON marshalling of file infos (#6087)

This commit is contained in:
Simon Frei
2019-10-15 11:25:12 +02:00
committed by Jakob Borg
parent aa4b918224
commit a0c9db1d09
5 changed files with 60 additions and 40 deletions

View File

@@ -124,6 +124,18 @@ func (f FileInfo) FileVersion() Vector {
return f.Version
}
func (f FileInfo) FileType() FileInfoType {
return f.Type
}
func (f FileInfo) FilePermissions() uint32 {
return f.Permissions
}
func (f FileInfo) FileModifiedBy() ShortID {
return f.ModifiedBy
}
// WinsConflict returns true if "f" is the one to choose when it is in
// conflict with "other".
func (f FileInfo) WinsConflict(other FileInfo) bool {