Documentation ¶
Overview ¶
file 文件处理相关函数
Index ¶
- func AppendBytes(filename string, data []byte) error
- func AppendString(filename string, data string) error
- func Copy(source string, dest string) (err error)
- func DirSize(path string) int64
- func FileExists(filename string) bool
- func FileTimeModified(filename string) time.Time
- func Find(searchDirs []string, filenames ...string) (filePath string, found bool)
- func GetBytes(filenameOrURL string, timeout ...time.Duration) ([]byte, error)
- func GetExt(filename string) string
- func GetPrefix(filename string) string
- func GetString(filenameOrURL string, timeout ...time.Duration) (string, error)
- func IsDir(dirname string) bool
- func Mkdir(path string) error
- func MkdirForFile(path string) (err error)
- func SetBytes(filename string, data []byte) error
- func SetString(filename string, data string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendBytes ¶
AppendBytes 向指定的文件追加[]byte内容.
func AppendString ¶
AppendString 向指定的文件追加string内容.
func FileTimeModified ¶
FileTimeModified 返回文件的最后修改时间 如果有错误则返回空time.Time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.