Documentation ¶
Index ¶
- func AppendFileBytes(targetPath string, addData []byte) error
- func AppendFileString(targetPath, addString string) error
- func CheckExists(targetPath string) bool
- func CopyFile(srcPath, destPath string) (int, error)
- func ReadFileAsBytes(readPath string) ([]byte, error)
- func ReadFileAsString(readPath string) (string, error)
- func ReplaceInFileWithRegex(file string, regexString string, replaceWith string) (int, error)
- func ReplaceInFileWithString(file, match, replacement string) (int, error)
- func SetPerms(targetPath string, perms int64) error
- func WriteFileFromBytes(destPath string, fileData []byte) error
- func WriteFileFromString(destPath string, fileData string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFileBytes ¶
AppendFileBytes takes a file and adds a byte array to the end of it
func AppendFileString ¶
AppendFileString takes a file and adds a string to the end of it
func CheckExists ¶
CheckExists takes a file or directory and checks to see if it exists on the file system
func ReadFileAsBytes ¶
ReadFileAsBytes takes a file path and reads that files contents and returns a byte array of the contents
func ReadFileAsString ¶
ReadFileAsString takes a file path and reads that files contents and returns a string representation of the contents
func ReplaceInFileWithRegex ¶
ReplaceInFileWithRegex searches a file for a string and replaces each instance found of that string. Returns the amount of strings replaced
func ReplaceInFileWithString ¶
ReplaceInFileWithString searches a file for a string and replaces each instance found of that string. Returns the amount of strings replaced
func WriteFileFromBytes ¶
WriteFileFromBytes writes data from a byte array to a dest filepath with the dest parent dirs permissions.
func WriteFileFromString ¶
WriteFileFromString writes data from a string to a dest filepath with the dest parent dirs permissions.
Types ¶
This section is empty.