github.com/keybase/client/go@v0.0.0-20240520164431-4f512a4c85a3/kbfs/libdokan/status_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 // NewNonTLFStatusFile returns a special read file that contains a 15 // text representation of the global KBFS status. 16 func NewNonTLFStatusFile(fs *FS) *SpecialReadFile { 17 return &SpecialReadFile{ 18 read: func(ctx context.Context) ([]byte, time.Time, error) { 19 return libfs.GetEncodedStatus(ctx, fs.config) 20 }, 21 fs: fs, 22 } 23 }