fileutil

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFromAssets

func CopyFromAssets(sourcePath, destPath string, wg *sync.WaitGroup)

Copy assets to a given destination

func CopyFromTemplates

func CopyFromTemplates(sourcePath, destPath string)

Copy templates to a given destination

func CreateDirs

func CreateDirs(path string)

Create all the directories of a given path

func CreateDirsFromAssets

func CreateDirsFromAssets(assetsRoot, baseDest string) error

Walk through the template assets and create all the directories contained in it

func CreateFiles

func CreateFiles(paths []string)

Create all the files from a given list of paths

func CreateFilesFromAssets

func CreateFilesFromAssets(assetsRoot, baseDest string) error

Walk through the template assets and create all the files contained in it

func DirSize

func DirSize(path string) (int64, error)

func FilesExist

func FilesExist(files []string) bool

Check if a given list of files exist

func FindFileInDir

func FindFileInDir(dirPath string, fileName string) (string, error)

Find a file with a given name under a give directory

func FindFileInParent

func FindFileInParent(fileName string) (string, error)

Find a file with a given name in parent directories

func FindFileParentInDir

func FindFileParentInDir(dirPath string, fileName string) (string, error)

Find a file with a given name in a given directory and walk through its parents

func GetCatalinaLogFile

func GetCatalinaLogFile() (string, error)

Get the main Tomcat log file

func GetLiferayHomePath

func GetLiferayHomePath() (string, error)

Get Liferay home path (i.e. root path of the Liferay bundle)

func GetLiferayWorkspacePath

func GetLiferayWorkspacePath() (string, error)

Get Liferay workspace path

func GetTomcatPath

func GetTomcatPath() (string, error)

Get the Tomcat home directory within the Liferay bundle

func GetTomcatScriptPath

func GetTomcatScriptPath(script string) (string, error)

Get the bin directory path under Tomcat home within the Liferay bundle

func IsGradleWorkspace

func IsGradleWorkspace(path string) bool

Check if the Liferay workspace is using Gradle

func IsInWorkspaceDir

func IsInWorkspaceDir() bool

Check if the current directory is under a Liferay workspace

func IsMavenWorkspace

func IsMavenWorkspace(path string) bool

Check if the Liferay workspace is using Maven

func Tail

func Tail(logFile string, follow bool)

Tail a given log file with the option to follow updates

func UpdateWithData

func UpdateWithData(file string, data interface{}) error

Update template files with given data

Types

This section is empty.

Jump to

Keyboard shortcuts

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