github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/os/stat.go (about) 1 // Copyright 2017 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package os 6 7 // Stat returns a FileInfo describing the named file. 8 // If there is an error, it will be of type *PathError. 9 func Stat(name string) (FileInfo, error) { 10 return statNolog(name) 11 } 12 13 // Lstat returns a FileInfo describing the named file. 14 // If the file is a symbolic link, the returned FileInfo 15 // describes the symbolic link. Lstat makes no attempt to follow the link. 16 // If there is an error, it will be of type *PathError. 17 func Lstat(name string) (FileInfo, error) { 18 return lstatNolog(name) 19 }