Documentation ¶
Index ¶
- func OpenFile(filename string) (*os.File, error)
- func OpenFileWithTrunc(filename string) (*os.File, error)
- func ReadFile(filename string) ([]byte, error)
- func WriteFile(filename string, data []byte, ifExistTrunc bool) error
- func WriteFileWithObj(f *os.File, data []byte) error
- func WriteFileWithoutClose(f *os.File, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenFileWithTrunc ¶
OpenFileWithTrunc 文件不存在则创建, 文件存在, 清空内容 返回的文件指针模式为可读可写 filename 文件路径.
func WriteFileWithObj ¶
WriteFileWithObj 写数据到文件, 文件对象会自动关闭 f 文件对象指针 data 需要写入的数据.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.