xos

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(path string) bool

IsDir 判断路径是否为目录 @param path string 路径 @return @1 bool 是否为目录

func IsFile added in v2.4.0

func IsFile(path string) bool

IsFile 判断路径是否为文件 @param path string 路径 @return @1 bool 是否为文件

func Split added in v2.4.0

func Split(path string) (dir, file, name, ext string)

Split 将路径分割成目录、文件名、文件名(不含后缀)、后缀 @param path string 路径 @return @1 string 目录部分 @return @2 string 文件名部分(含后缀) @return @3 string 文件名(不含后缀) @return @4 string 后缀

func Stat added in v2.4.0

func Stat(filePath string) (stat.FileInfo, error)

Stat 获取文件信息 @param filePath string 文件路径 @return @1 stat.FileInfo 文件信息 @return @2 error 错误信息

func WriteFile added in v2.4.0

func WriteFile(file string, data []byte) error

WriteFile 写文件,目录不存在时自动创建 @param file string 文件路径 @param data []byte 待写入的数据 @return @1 error 错误信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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