filesystem

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFolder

func CreateFolder(path string) error

CreateFolder recursively creates required directories.

func Delete

func Delete(target string) error

Delete Removes a folder or file from the filesystem.

func FileHasText

func FileHasText(target string, text string) (bool, error)

FileHasText Checks if a file already have specific text

func FolderExist

func FolderExist(target string) error

FolderExist Checks if a folder exists in the filesystem.

func GetFileContent

func GetFileContent(path string) ([]byte, error)

GetFileContent Retrieves the content of a file.

func SaveBinaryFile

func SaveBinaryFile(target string, assetReader io.ReadCloser) error

func SaveFile

func SaveFile(rc io.ReadCloser, executablePath string, mode fs.FileMode) error

SaveFile Stores content into a file

func WriteToFile

func WriteToFile(target string, text string) error

WriteToFile Writes text to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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