github.com/IBM/fsgo@v0.0.0-20220920202152-e16fd2119d49/lstater.go (about) 1 // Copyright 2022 IBM Inc. All rights reserved 2 // Copyright © 2014 Steve Francia <spf@spf13.com> 3 // 4 // SPDX-License-Identifier: Apache2.0 5 package fsgo 6 7 import ( 8 "os" 9 ) 10 11 // Lstater is an optional interface in Fsgo. It is only implemented by the 12 // filesystems saying so. 13 // It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem. 14 // Else it will call Stat. 15 // In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not. 16 type Lstater interface { 17 LstatIfPossible(name string) (os.FileInfo, bool, error) 18 }