mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-10 18:24:44 +00:00
FileInfoTruncated.String() for stindex' benefit
This commit is contained in:
parent
9bbadac9dc
commit
d031f958a9
@ -64,6 +64,11 @@ type FileInfoTruncated struct {
|
|||||||
NumBlocks uint32
|
NumBlocks uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f FileInfoTruncated) String() string {
|
||||||
|
return fmt.Sprintf("File{Name:%q, Flags:0%o, Modified:%d, Version:%d, Size:%d, NumBlocks:%d}",
|
||||||
|
f.Name, f.Flags, f.Modified, f.Version, f.Size(), f.NumBlocks)
|
||||||
|
}
|
||||||
|
|
||||||
// Returns a statistical guess on the size, not the exact figure
|
// Returns a statistical guess on the size, not the exact figure
|
||||||
func (f FileInfoTruncated) Size() int64 {
|
func (f FileInfoTruncated) Size() int64 {
|
||||||
if IsDeleted(f.Flags) || IsDirectory(f.Flags) {
|
if IsDeleted(f.Flags) || IsDirectory(f.Flags) {
|
||||||
|
Loading…
Reference in New Issue
Block a user