zcpath

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 5 Imported by: 0

README

path相关处理

用于本地目录与文件的相关处理。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(path string) (bool, error)

CreateDir 创建目录

@param path 目录路径
@return bool 创建成功与否
@return error

func FilterFileByCondition added in v0.0.3

func FilterFileByCondition(dir string, condition FileFilterCondition) []string

FilterFileByCondition 根据条件过滤文件

Types

type FileFilterCondition added in v0.0.3

type FileFilterCondition struct {
	FileNamePrefix string // 文件名前缀
	FileNameSuffix string // 文件名后缀
	FileNameRegex  string // 文件名正则表达式
	ContainsHidden bool   // 是否查找隐藏文件
	ContainsDir    bool   // 是否查找目录
}

Jump to

Keyboard shortcuts

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