tfile

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2025 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileAppendData

func FileAppendData(filePath string, data string) error

FileAppendData 将字符串追加到文件尾,如果文件不存在则创建该文件。 Args: filePath string 文件路径, data string 要追加的数据,。 Return: error 错误信息。

func FileDelete

func FileDelete(filePath string) error

FileDelete 删除文件 Args: filePath string 文件路径。 Return: error 错误信息。

func FileEnsureDirAndFileExists

func FileEnsureDirAndFileExists(filePath string, data string) error

FileEnsureDirAndFileExists 确保目录和文件存在,如果文件不存在则创建目录和文件,同时写入文件内容。 Args: filePath string 文件路径, data string 文件内容。 Return: error 错误信息。

func FileOverWrite

func FileOverWrite(filePath string, data string) error

FileOverWrite 如果文件已经存在,内容会被覆盖。 Args: filePath string 文件路径, data string 文件内容 Returns: error 错误信息。

func FileRead

func FileRead(filePath string) (string, error)

FileRead 读取指定路径文件内容 Args: filePath string 文件路径。 Returns: string 文件内容, error 错误信息。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL