osT

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src string, dst ...string)

文件复制

func FileIsExists

func FileIsExists(path string) bool

判断文件是否存在

func FlagParse added in v0.2.4

func FlagParse()

func GetCmdArgs added in v0.2.4

func GetCmdArgs(key, defaultValue, help string) *string

从命令行参数中获取参数

func GetCmdArgsBool added in v0.2.4

func GetCmdArgsBool(key string, defaultValue bool, help string) *bool

func GetCmdArgsFloat added in v0.2.4

func GetCmdArgsFloat(key string, defaultValue float64, help string) *float64

func GetCmdArgsInt added in v0.2.4

func GetCmdArgsInt(key string, defaultValue int, help string) *int

func GetCmdInput added in v0.2.4

func GetCmdInput(tips string, ignoreCase bool, endChar ...string) string

获取cmd输入

func GetCmdInputFloat added in v0.2.4

func GetCmdInputFloat(tips string, endChar ...string) float64

func GetCmdInputInt added in v0.2.4

func GetCmdInputInt(tips string, endChar ...string) int

func GetCmdInputString added in v0.2.4

func GetCmdInputString(tips string, endChar ...string) string

func GetDirFile added in v0.1.3

func GetDirFile(root string, getDir bool, level int) []string

获取目录下所有文件

func GetFileAbsDir

func GetFileAbsDir(path string) string

获取文件绝对路径

func GetFileDir

func GetFileDir(path string) string

获取文件目录

func GetFileListLevel1 added in v0.2.4

func GetFileListLevel1(root string, getDir ...bool) []string

获取一级目录下的文件列表

func GetFileName

func GetFileName(path string) string

获取文件名

func GetFileNameWithSuffix

func GetFileNameWithSuffix(path string) string

获取文件名带后缀

func GetFileSuffix

func GetFileSuffix(path string) string

获取文件后缀

func IsDir

func IsDir(name string) bool

判断是否是目录

func IsFile

func IsFile(name string) bool

判断是否是文件

func MakeDirs

func MakeDirs(dir string)

创建文件夹

func RenameFile

func RenameFile(old, new string)

文件重命名

Types

This section is empty.

Jump to

Keyboard shortcuts

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