Documentation
¶
Index ¶
- func AppendAllLine(filePath string, contents []string)
- func AppendLine(filePath string, content string)
- func AppendString(filePath string, content string)
- func ClearFile(path string)
- func CopyFile(srcName string, destName string)
- func CopyFolder(srcPath string, destPath string)
- func CreateDir(path string, perm os.FileMode)
- func CreateDir766(path string)
- func Delete(filePath string)
- func GetFiles(path string, searchPattern string, searchSubDir bool) []string
- func IsExists(path string) bool
- func ReadAllLines(filePath string) []string
- func ReadString(filePath string) string
- func WriteByte(filePath string, content []byte)
- func WriteString(filePath string, content string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendAllLine ¶
AppendAllLine 换行追加文件 filePath:文件路径 contents:文件内容
func AppendLine ¶
AppendLine 换行追加文件 filePath:文件路径 content:文件内容
func AppendString ¶
AppendString 追加文件 filePath:文件路径 content:文件内容
func CopyFolder ¶
CopyFolder 复制整个文件夹 srcPath 要复制的原目录路径 destPath 复制到位置的目录路径
func GetFiles ¶
GetFiles 读取指定目录下的文件 path:目录路径 searchPattern:匹配文件名要包含的名称,搜索全部,传入""即可 searchSubDir:是否要搜索子目录
func ReadAllLines ¶
ReadAllLines 读文件内容,按行返回数组 filePath:文件路径
func WriteString ¶
WriteString 写入文件 filePath:文件路径 content:文件内容
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.