2,187
社区成员
发帖
与我相关
我的任务
分享
// Stat returns a FileInfo describing the named file.
// If there is an error, it will be of type *PathError.
func Stat(name string) (FileInfo, error) {
var fs fileStat
err := syscall.Stat(name, &fs.sys)
if err != nil {
return nil, &PathError{"stat", name, err}
}
fillFileStatFromSys(&fs, name)
return &fs, nil
}