Documentation ¶
Overview ¶
Copyright (c) 2015-2018 All rights reserved. 本软件源代码版权归 my.oschina.net/tantexian 所有,允许复制与学习借鉴. Author: tantexian, <tantexian@qq.com> Since: 2017/8/7
Index ¶
- func Basename(fp string) string
- func EnsureDir(fp string) error
- func FileDir(fp string) string
- func FileSize(file *os.File) (int64, error)
- func InsureDir(fp string) error
- func IsExist(fp string) bool
- func ListFilesOrDir(path string, listType string) ([]string, error)
- func Offset2FileName(offset int64) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDir ¶
EnsureDir dir if not exist 如果path为"./tmp/test/test.txt"则只会创建./tmp/test/目录 Author: tantexian, <tantexian@qq.com> Since: 2017/8/8
func IsExist ¶
IsExist checks whether a file or directory exists. It returns false when the file or directory does not exist.
func ListFilesOrDir ¶
ListFilesOrDir 返回当前目录下所有的文件或者目录 Params: path 路径 Return: listType 从ALL|DIR|FILE选取,分别代表返回所有,目录,文件 Author: tantexian, <tantexian@qq.com> Since: 2017/8/8
func Offset2FileName ¶
Offset2FileName 格式化位20个字符长度的string Author: tantexian, <tantexian@qq.com> Since: 2017/8/9
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.