fileutils

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssetsBox *rice.Box

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(boxed, to string, assetsBox *rice.Box)

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 CopyTemplate

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

CopyTemplate create file from a template asset

func DownloadFile

func DownloadFile(url string, filepath string)

DownloadFile will download a url to a local 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