file

package
v0.0.0-...-8c00ab9 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistFile

func ExistFile(filePath string) bool

ExistFile 判断文件是否存在

func GetCurrentAbPath

func GetCurrentAbPath() string

GetCurrentAbPath 最终方案-全兼容

func GetCurrentAbPathByCaller

func GetCurrentAbPathByCaller() string

GetCurrentAbPathByCaller 获取当前执行文件绝对路径(go run)

func GetCurrentAbPathByExecutable

func GetCurrentAbPathByExecutable() string

GetCurrentAbPathByExecutable 获取当前执行文件绝对路径

func GetCurrentPath

func GetCurrentPath() string

GetCurrentPath 获取调用方当前目录路径

func GetDirSon

func GetDirSon(filePath string) ([]os.FileInfo, error)

GetDirSon 返回目录下子文件/目录列表

func GetDirWalk

func GetDirWalk(filePath string) (map[string]os.FileInfo, error)

GetDirWalk 递归获取路径子文件,目录列表

func GetFileModTime

func GetFileModTime(filePath string) (time.Time, error)

GetFileModTime 获取文件修改时间

func GetTmpDir

func GetTmpDir() string

GetTmpDir 获取系统临时目录,兼容go run

func IsDir

func IsDir(filePath string) (bool, error)

IsDir 是否是目录

func ReadSmallFile

func ReadSmallFile(filePath string) (*string, errors.AppError)

ReadSmallFile 读取小文件,一次性读取

func WriteFile

func WriteFile(filePath, content string)

WriteFile 写文件

Types

This section is empty.

Jump to

Keyboard shortcuts

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