github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/kbfs/libdokan/tlf_edit_history_file.go (about) 1 // Copyright 2016 Keybase Inc. All rights reserved. 2 // Use of this source code is governed by a BSD 3 // license that can be found in the LICENSE file. 4 5 package libdokan 6 7 import ( 8 "time" 9 10 "github.com/keybase/client/go/kbfs/libfs" 11 "golang.org/x/net/context" 12 ) 13 14 // NewTlfEditHistoryFile returns a special read file that contains a text 15 // representation of the file edit history for that TLF. 16 func NewTlfEditHistoryFile(folder *Folder) *SpecialReadFile { 17 return &SpecialReadFile{ 18 read: func(ctx context.Context) ([]byte, time.Time, error) { 19 return libfs.GetEncodedTlfEditHistory( 20 ctx, folder.fs.config, folder.getFolderBranch()) 21 }, 22 fs: folder.fs, 23 } 24 }