From d031f958a91e836aadb57dddf18ac380ad6b8ea3 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 16 Oct 2014 09:26:20 +0200 Subject: [PATCH] FileInfoTruncated.String() for stindex' benefit --- internal/protocol/message.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/protocol/message.go b/internal/protocol/message.go index feeba69df..800787b91 100644 --- a/internal/protocol/message.go +++ b/internal/protocol/message.go @@ -64,6 +64,11 @@ type FileInfoTruncated struct { 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 func (f FileInfoTruncated) Size() int64 { if IsDeleted(f.Flags) || IsDirectory(f.Flags) {