aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/entry.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer2/entry.go')
-rw-r--r--weed/filer2/entry.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/filer2/entry.go b/weed/filer2/entry.go
index 6dff99af9..00b9b132d 100644
--- a/weed/filer2/entry.go
+++ b/weed/filer2/entry.go
@@ -73,3 +73,11 @@ func (entry *Entry) ToProtoFullEntry() *filer_pb.FullEntry {
Entry: entry.ToProtoEntry(),
}
}
+
+func FromPbEntry(dir string, entry *filer_pb.Entry) *Entry {
+ return &Entry{
+ FullPath: util.NewFullPath(dir, entry.Name),
+ Attr: PbToEntryAttribute(entry.Attributes),
+ Chunks: entry.Chunks,
+ }
+}