Documentation
¶
Overview ¶
Package sdfile 文件及读写工具
Index ¶
- func AbsByBin(filename string) string
- func AppendBytes(filename string, data []byte, perm os.FileMode) error
- func AppendText(filename string, text string, perm os.FileMode) error
- func BinDir() string
- func Exists(filename string) bool
- func FirstExists(filenames ...string) string
- func IsDir(filename string) bool
- func ReadBytes(filename string) ([]byte, error)
- func ReadBytesDef(filename string, def []byte) []byte
- func ReadText(filename string) (string, error)
- func ReadTextDef(filename, def string) string
- func UseTempDir(dir, pattern string, action func(string)) error
- func UseTempDirForResult[R any](dir, pattern string, action func(string) (R, error)) (R, error)
- func UseTempFile(dir, pattern string, action func(*os.File)) error
- func UseTempFileForResult[R any](dir, pattern string, action func(*os.File) (R, error)) (R, error)
- func WriteBytes(filename string, data []byte, perm os.FileMode) error
- func WriteText(filename string, text string, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstExists ¶
func ReadBytesDef ¶
func ReadTextDef ¶
func UseTempDir ¶
func UseTempDirForResult ¶
func UseTempFileForResult ¶
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package sdfiletype 通过内容判别文件类型
|
Package sdfiletype 通过内容判别文件类型 |
Package sdhttpfile 从http文件系统中读取内容
|
Package sdhttpfile 从http文件系统中读取内容 |
Click to show internal directories.
Click to hide internal directories.