github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/kbfs/libdokan/user_edit_history.go (about)

     1  // Copyright 2018 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  // NewUserEditHistoryFile returns a special read file that contains a text
    15  // representation of the file edit history for the logged-in user.
    16  func NewUserEditHistoryFile(folder *Folder) *SpecialReadFile {
    17  	return &SpecialReadFile{
    18  		read: func(ctx context.Context) ([]byte, time.Time, error) {
    19  			return libfs.GetEncodedUserEditHistory(ctx, folder.fs.config)
    20  		},
    21  		fs: folder.fs,
    22  	}
    23  }