Documentation ¶
Index ¶
- func CompressZip(files []*os.File, dest string) error
- func CreateCar(ctx context.Context, inputDirectory string, outputFile string, version int) (string, error)
- func DeCompressZip(zipFile, dest string) error
- func DefaultConfigDir() string
- func GetFilenameWithSuffixAndFilenameOnly(path string) (fileName string, fileNameWithSuffix string)
- func GetFiles(workdir string, fuzzyPath []string, pathList []string) []string
- func GetRedundantPath(shortPath string, longPath string) (err error, path string)
- func GetSameFileNameFiles(workdir string, fileName string, pathList []string) []string
- func GetSuffixFiles(workdir string, suffixName string, pathList []string) []string
- func GetUIDAndGID() (string, string, error)
- func RandSeq(n int) string
- func ReplaceWithParam(content string, paramMap map[string]string) string
- func SlicePage(page, pageSize, nums int) (int, int, int, int)
- type Cmd
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressZip ¶
CompressZip Compress files to zip files File array, which can be files or folders under different dirs dest Compressed file storage address
func DefaultConfigDir ¶
func DefaultConfigDir() string
func GetFilenameWithSuffixAndFilenameOnly ¶
GetFilenameWithSuffixAndFilenameOnly 获取带后置的文件名和不带后缀的文件名
func GetRedundantPath ¶
GetRedundantPath 获取多余的路径 longPath相对于shortPath的 /a/b/ /a/b/c/d.txt return c/d.txt
func GetSameFileNameFiles ¶
GetSameFileNameFiles 获取路径下的所有相同文件文件名的文件 workdir 基础路径 fileName 要赛选的路径 pathList 查找到的路径对象
func GetSuffixFiles ¶
GetSuffixFiles 获取路径下的所有相同后缀文件 workdir 基础路径 suffixName 要赛选的路径 pathList 查找到的路径对象
func GetUIDAndGID ¶
func ReplaceWithParam ¶
ReplaceWithParam 参数替换
Types ¶
type Cmd ¶
func NewCommand ¶
NewCommand is like exec.CommandContext but ensures that subprocesses are killed when the context times out, not just the top level process.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.