github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/kbfs/libfuse/error_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 //go:build !windows 6 // +build !windows 7 8 package libfuse 9 10 import ( 11 "time" 12 13 "github.com/keybase/client/go/kbfs/libfs" 14 ) 15 16 // NewErrorFile returns a special read file that contains a text 17 // representation of the last few KBFS errors. 18 func NewErrorFile(fs *FS, entryValid *time.Duration) *SpecialReadFile { 19 *entryValid = 0 20 return &SpecialReadFile{read: libfs.GetEncodedErrors(fs.config)} 21 }