osT

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UTF8    = charset("UTF-8")
	GB18030 = charset("GB18030")
)
View Source
const (
	MB_OK                = 0x00000000
	MB_OKCANCEL          = 0x00000001
	MB_ABORTRETRYIGNORE  = 0x00000002
	MB_YESNOCANCEL       = 0x00000003
	MB_YESNO             = 0x00000004
	MB_RETRYCANCEL       = 0x00000005
	MB_CANCELTRYCONTINUE = 0x00000006
	MB_ICONHAND          = 0x00000010
	MB_ICONQUESTION      = 0x00000020
	MB_ICONEXCLAMATION   = 0x00000030
	MB_ICONASTERISK      = 0x00000040
	MB_USERICON          = 0x00000080
	MB_ICONWARNING       = MB_ICONEXCLAMATION
	MB_ICONERROR         = MB_ICONHAND
	MB_ICONINFORMATION   = MB_ICONASTERISK
	MB_ICONSTOP          = MB_ICONHAND

	MB_DEFBUTTON1 = 0x00000000
	MB_DEFBUTTON2 = 0x00000100
	MB_DEFBUTTON3 = 0x00000200
	MB_DEFBUTTON4 = 0x00000300
)

Variables

This section is empty.

Functions

func ByteToString

func ByteToString(byte []byte, charset charset) string

对字符进行转码

func CopyFile

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

文件复制

func ExecCommand

func ExecCommand(commandName string, params []string, f func(str string))

封装一个函数来执行命令

func ExpiredCheck added in v0.1.9

func ExpiredCheck(ti time.Time)

检查是否过期

func ExpiredCheckWithInfo added in v0.1.9

func ExpiredCheckWithInfo(ti time.Time, infos [][]string)

检查是否过期(自定义消息)

func FileIsExists

func FileIsExists(path string) bool

判断文件是否存在

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 GetFileListLeval1

func GetFileListLeval1(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 IntPtr

func IntPtr(n int) uintptr

func IsDir

func IsDir(name string) bool

判断是否是目录

func IsFile

func IsFile(name string) bool

判断是否是文件

func KillCommand

func KillCommand(pid int)

杀死进程

func MakeDirs

func MakeDirs(dir string)

创建文件夹

func MessageBoxYesNo

func MessageBoxYesNo(title, text string) bool

func MessageBoxYesNoCancel

func MessageBoxYesNoCancel(title, text string) int

func RenameFile

func RenameFile(old, new string)

文件重命名

func StdOut

func StdOut(f func(str string), out ...io.Reader)

func StrPtr

func StrPtr(s string) uintptr

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳