utils

package
v1.2.2-0...-301a9f9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CodeGeneratorPath = "/.compage/workdir"

CodeGeneratorPath Constant for referencing temporary directory to hold a generated project.

View Source
const SubstrString = "/"

SubstrString char to split into substrings.

View Source
const TemplateExtension = ".tmpl"

TemplateExtension template's extension.

View Source
const TemplateExtensionPattern = "/*" + TemplateExtension

TemplateExtensionPattern pattern for templates.

Variables

This section is empty.

Functions

func CopyAllInSrcDirToDestDir

func CopyAllInSrcDirToDestDir(destDirectory, srcDirectory string, copyNestedDir bool) error

CopyAllInSrcDirToDestDir copies content of srcDirectory to destDirectory based on flag copyNestedDir

func CopyFile

func CopyFile(destFilePath, srcFilePath string) (int64, error)

CopyFile copies src file to dest

func CopyFiles

func CopyFiles(destDirectory string, srcDirectory string) error

CopyFiles copies only file in the srcDirectory to destDirectory, doesn't do it recursively.

func CreateDirectories

func CreateDirectories(dirName string) error

CreateDirectories creates the directory specified and all other directories in the path.

func DirectoryExists

func DirectoryExists(directoryPath string) (bool, error)

func GetBaseTemplateRootPath

func GetBaseTemplateRootPath() (string, error)

func GetDirectoriesAndFilePaths

func GetDirectoriesAndFilePaths(templatesPath string) ([]*string, []*string, error)

GetDirectoriesAndFilePaths returns files and directories in given a path or error.

func GetProjectDirectoryName

func GetProjectDirectoryName(name string) string

GetProjectDirectoryName returns tarFile parent path

func GetTemplatesRootPath

func GetTemplatesRootPath(languageTemplateDirectoryName string) (string, error)

GetTemplatesRootPath returns a root path of the language template passed.

func IgnorablePaths

func IgnorablePaths(path string) bool

IgnorablePaths ignores a few directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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