// Get the file info of the file in path.
// If path points at a symlink and `followSymlink == false`, return the file info of the symlink instead
Get the file info of the file in path.
If path points at a symlink and `followSymlink == false`, return the file info of the symlink instead
// Get the file info of the file in path . // If path points at a symlink and ` followSymlink == false ` return the file info of the symlink instead
func GetFileInfo(path string, followSymlink bool) (fileInfo os.FileInfo, err error) {
	if followSymlink {
		fileInfo, err = os.Lstat(path)
	} else {
		fileInfo, err = os.Stat(path)
	}
	return fileInfo, err
}
func GetFileInfo ( path string , followSymlink bool ) ( fileInfo os . FileInfo , err error ) { if followSymlink { fileInfo , err = os . Lstat ( path ) } else { fileInfo , err = os . Stat ( path ) } return fileInfo , err }
Get the file info of the file in path.
Get the file info of the file in path .
// We should not do CheckError here, because the error is checked by the calling functions.