file

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombineFile added in v1.10.0

func CombineFile(fileList []string, target string)

合并文件

fileList 文件列表

target 文件输出路径

func CopyDir added in v1.2.0

func CopyDir(base string, target string)

复制文件夹

base 代表源目录 target 代表目标目录

func ReadDir added in v1.2.0

func ReadDir(base string) []string

读取文件夹

base 文件夹的路径

返回值是文件夹下所有的文件列表

func ReadDirAll added in v1.2.0

func ReadDirAll(base string) ([]string, []string)

读取文件夹

base 文件夹的路径

第一个返回值是文件夹下所有的文件列表

第二个返回值是文件夹列表

func ReadDirDeep

func ReadDirDeep(base string, list *[]string, dirList *[]string)

递归遍历文件夹 base 文件夹的路径 list 文件列表 dirList 文件夹列表

func SliceFile added in v1.8.0

func SliceFile(out string, filePath string, num int) []string

把一个文件切片成多个文件

out 切片输出的目录

filePath 切片的文件路径

num 切片数量

func TransFile added in v1.2.0

func TransFile(source string, target string) error
复制文件

source 源文件路径,

target 目标文件路径

注意中间的目录会自动创建,无需关心

Types

This section is empty.

Jump to

Keyboard shortcuts

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