Documentation ¶
Index ¶
- func CleanupTempDir(dirPath string) error
- func CleanupTempFile(filePath string) error
- func CopyDir(srcDir, dstDir string) error
- func CopyFile(srcPath, dstPath string) error
- func CreateDir(dirPath string) error
- func CreateTempDir(prefix string) (string, error)
- func CreateTempFile(prefix string) (string, error)
- func DeleteFile(filePath string) error
- func EnsureDir(dir string) error
- func GetCurrentDir() string
- func GetFileContent(filePath string) (string, error)
- func GetFileModTime(filePath string) (time.Time, error)
- func GetFilePermissions(filePath string) (os.FileMode, error)
- func GetFileSize(filePath string) (int64, error)
- func HashFile(filePath string) (string, error)
- func IsDir(dirPath string) bool
- func IsEmptyDir(dirPath string) (bool, error)
- func IsExecutable(filePath string) bool
- func IsExists(filePath string) bool
- func IsFile(filePath string) bool
- func IsNotExists(filePath string) bool
- func IsReadable(filePath string) bool
- func IsSameFile(file1, file2 string) (bool, error)
- func IsSymlink(filePath string) bool
- func IsWritable(filePath string) bool
- func ListFiles(dirPath string) ([]string, error)
- func Match(optionFuncs ...MatchOptionsFunc) ([]string, error)
- func MatchFiles(optionFuncs ...MatchOptionsFunc) ([]string, error)
- func MoveFile(srcPath, dstPath string) error
- func ReadFile(filePath string) (string, error)
- func SetFilePermissions(filePath string, mode os.FileMode) error
- func WriteFile(filePath, content string, mode os.FileMode) error
- func WriteTempFile(prefix string, data []byte) (string, error)
- type MatchOptionsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempDir ¶
CreateTempDir 创建一个临时目录并返回目录路径
func CreateTempFile ¶
CreateTempFile 创建一个临时文件并返回文件路径
func GetFileContent ¶ added in v0.1.2
GetFileContent 获取文件内容
func GetFileModTime ¶
GetFileModTime 获取文件的最后修改时间
func GetFilePermissions ¶
GetFilePermissions 获取文件权限
func IsSameFile ¶ added in v0.1.3
IsSameFile 检查两个文件是否相同
func Match ¶ added in v0.1.8
func Match(optionFuncs ...MatchOptionsFunc) ([]string, error)
Match 根据给定的选项匹配文件和目录
func MatchFiles ¶
func MatchFiles(optionFuncs ...MatchOptionsFunc) ([]string, error)
MatchFiles 根据给定的选项匹配文件
func SetFilePermissions ¶
SetFilePermissions 设置文件权限
Types ¶
Click to show internal directories.
Click to hide internal directories.