fileutils

package
v0.1042.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: BSD-3-Clause Imports: 14 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 AssetsBox

func AssetsBox() *rice.Box

AssetsBox hover's assets box

func CopyAsset

func CopyAsset(boxed, to string, assetsBox *rice.Box)

CopyAsset copies a file from asset

func CopyDir

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

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 ExecuteTemplateFromAssetsBox

func ExecuteTemplateFromAssetsBox(boxed, to string, assetsBox *rice.Box, templateData interface{})

ExecuteTemplateFromAssetsBox create file from a template asset

func ExecuteTemplateFromFile

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

ExecuteTemplateFromFile create file from a template file

func IsDirectory

func IsDirectory(path string) bool

IsDirectory check if path exists and is a directory

func IsFileExists

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