// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build unix || (js && wasm) || wasip1

package os

import (
	
)

// Stat returns the [FileInfo] structure describing file.
// If there is an error, it will be of type [*PathError].
func ( *File) () (FileInfo, error) {
	if  == nil {
		return nil, ErrInvalid
	}
	var  fileStat
	 := .pfd.Fstat(&.sys)
	if  != nil {
		return nil, .wrapErr("stat", )
	}
	fillFileStatFromSys(&, .name)
	return &, nil
}

// statNolog stats a file with no test logging.
func statNolog( string) (FileInfo, error) {
	var  fileStat
	 := ignoringEINTR(func() error {
		return syscall.Stat(, &.sys)
	})
	if  != nil {
		return nil, &PathError{Op: "stat", Path: , Err: }
	}
	fillFileStatFromSys(&, )
	return &, nil
}

// lstatNolog lstats a file with no test logging.
func lstatNolog( string) (FileInfo, error) {
	var  fileStat
	 := ignoringEINTR(func() error {
		return syscall.Lstat(, &.sys)
	})
	if  != nil {
		return nil, &PathError{Op: "lstat", Path: , Err: }
	}
	fillFileStatFromSys(&, )
	return &, nil
}