Documentation ¶
Index ¶
- func CopyDir(sourceDirPath, targetDirPath string) (bool, error)
- func CreateFile(filePath string) (bool, error)
- func CreateFileDir(filePath string) (bool, error)
- func CurrentDir() string
- func Del(path string) (bool, error)
- func DelFiles(dir string, delDir bool) error
- func Exists(path string) (bool, error)
- func GetAllFiles(dirPth string) (files []string, err error)
- func GetFilesAndDirs(dirPth string) (files []string, dirs []string, err error)
- func GetFilesTree(rootName string, delRoot bool) *emity.MsgEmity
- func IsDir(path string) bool
- func IsExist(path string) bool
- func IsFile(path string) bool
- func Read(path string) *emity.MsgEmity
- func ReadFromFile(path string) *emity.MsgEmity
- func Save(text string, path string) (bool, error)
- type FileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileDir ¶
*
- 创建文件所在文件夹
- 注意:必须是文件,否则只能创建出上级路径
- @param filePath 文件路径
- @return bool:是否成功(如果路径已经存在则不会创建,但返回true); error:错误信息
func GetAllFiles ¶
获取指定目录下的所有文件,包含子目录下的文件
func GetFilesAndDirs ¶
获取指定目录下的所有文件和目录
Types ¶
Click to show internal directories.
Click to hide internal directories.