shell: remote.cache remote.uncache

This commit is contained in:
Chris Lu
2021-08-09 14:35:18 -07:00
parent 8cfd487608
commit 713c035a6e
15 changed files with 1752 additions and 1069 deletions

View File

@@ -57,6 +57,23 @@ func (entry *Entry) Timestamp() time.Time {
}
}
func (entry *Entry) ShallowClone() *Entry {
if entry == nil {
return nil
}
newEntry := &Entry{}
newEntry.FullPath = entry.FullPath
newEntry.Attr = entry.Attr
newEntry.Chunks = entry.Chunks
newEntry.Extended = entry.Extended
newEntry.HardLinkId = entry.HardLinkId
newEntry.HardLinkCounter = entry.HardLinkCounter
newEntry.Content = entry.Content
newEntry.Remote = entry.Remote
return newEntry
}
func (entry *Entry) ToProtoEntry() *filer_pb.Entry {
if entry == nil {
return nil