fileutils

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLineToFile

func AddLineToFile(filePath, newLine string)

AddLineToFile appends a newLine to a file if the line isn't already present.

func CopyAsset

func CopyAsset(name, to string)

CopyAsset copies a file from asset

func CopyDir added in v0.37.0

func CopyDir(src, dst string)

CopyDir copy files from one directory to another directory recursively

func CopyFile

func CopyFile(src, to string)

CopyFile from one file to another

func CopyTemplateDir added in v0.38.0

func CopyTemplateDir(boxed, to string, templateData interface{})

CopyTemplateDir copy files from one directory to another directory recursively while executing all templates in files and file names

func DownloadFile

func DownloadFile(url string, filepath string)

DownloadFile will download a url to a local file.

func ExecuteTemplateFromAssets added in v0.47.2

func ExecuteTemplateFromAssets(name, to string, templateData interface{})

ExecuteTemplateFromAssets create file from a template asset

func ExecuteTemplateFromFile added in v0.38.0

func ExecuteTemplateFromFile(boxed, to string, templateData interface{})

ExecuteTemplateFromFile create file from a template file

func IsDirectory added in v0.37.0

func IsDirectory(path string) bool

IsDirectory check if path exists and is a directory

func IsFileExists added in v0.37.0

func IsFileExists(filename string) bool

IsFileExists checks if a file exists and is not a directory

func RemoveLinesFromFile

func RemoveLinesFromFile(filePath, text string)

RemoveLinesFromFile removes lines to a file if the text is present in the line

Types

This section is empty.

Jump to

Keyboard shortcuts

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