Documentation
¶
Index ¶
- func AlterFile(path string, data []byte) error
- func AlterFileWithString(path string, content string, fileMod fs.FileMode) error
- func AlterFileWithStringFast(path string, content string) error
- func AppendFileHead(path string, content []byte) error
- func AppendFileTail(path string, content []byte) error
- func CheckOrCreateFileWithString(path string, content string, fileMod fs.FileMode) error
- func CheckOrCreateFileWithStringFast(path string, context string) error
- func Mkdir(path string) error
- func PathExists(path string) (bool, error)
- func PathExistsFast(path string) bool
- func PathIsDir(path string) bool
- func ReadFileAsByte(path string) ([]byte, error)
- func RmDir(path string, force bool) error
- func WriteFileByByte(path string, data []byte, fileMod fs.FileMode, coverage bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlterFile ¶
AlterFile
alter file @param path string @param data []byte
this method will keep file mode if file not exist, will not create file and return error
func AlterFileWithString ¶
AlterFileWithString
check or file with content, if file exist, will coverage @param path string @param content string @param fileMod os.FileMode(0766) os.FileMode(0666) os.FileMode(0644)
func AlterFileWithStringFast ¶
AlterFileWithStringFast
check or file with content, if file exist, will coverage crate folder of file with os.FileMode(0766) @param path string @param content string
func AppendFileHead ¶
AppendFileHead
append file head @param path string @param content []byte
this method will keep file mode if file not exist, will not create file and return error
func AppendFileTail ¶
AppendFileTail
append file tail @param path string @param content []byte
this method will keep file mode if file not exist, will not create file and return error
func CheckOrCreateFileWithString ¶
CheckOrCreateFileWithString
check or create file with content, if file exist, will not coverage @param path string @param content string @param fileMod os.FileMode(0766) os.FileMode(0666) os.FileMode(0644)
func CheckOrCreateFileWithStringFast ¶
CheckOrCreateFileWithStringFast
check or create file with content, if file exist, will not coverage crate folder of file with os.FileMode(0766) @param path string @param content string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.