Help us shape the future of Go! Take the 2026 Go Developer Survey

stat

package
v2.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo interface {
	// Name 获取文件名称
	Name() string
	// Size 获取文件大小
	Size() int64
	// Mode 获取文件模式
	Mode() os.FileMode
	// IsDir 检测文件是否是目录
	IsDir() bool
	// IsFile 检测文件是否是普通文件
	IsFile() bool
	// Sys 获取系统原始数据
	Sys() any
	// CreateTime 获取文件创建时间
	CreateTime() time.Time
	// ModifyTime 获取文件修改时间
	ModifyTime() time.Time
}

func Stat

func Stat(filePath string) (FileInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL