layout

package
v2.20.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssetsDir    = "assets"
	CacheDir     = "cache"
	DistsDir     = "dists"
	ConfigsDir   = "configs"
	DownloadsDir = "downloads"
	PluginsDir   = "plugins"
)
View Source
const (
	AppName       = "godel"
	AppDir        = "gödel-app"
	AppExecutable = "app-executable"
)
View Source
const (
	WrapperDir        = "wrapper-dir"
	WrapperScriptFile = "wrapper-script"
	WrapperAppDir     = "wrapper-app"
	WrapperConfigDir  = "config"
	WrapperName       = "godelw"
)

Variables

This section is empty.

Functions

func AllPaths

func AllPaths(dir string) (map[string]bool, error)

AllPaths returns a map that contains all of the paths in the provided directory. The paths are relative to the directory. The boolean key is true if the path is a directory, false otherwise.

func AppSpec

func AppSpec() s.LayoutSpec

func AppSpecDir

func AppSpecDir(rootDir, version string) (s.SpecDir, error)

func AppSpecTemplate

func AppSpecTemplate(version string) s.TemplateValues

func Checksum

func Checksum(p string) (string, error)

func CopyDir

func CopyDir(src, dst string) error

CopyDir recursively copies the src directory to the path specified by dst. dst must not already exist and the path up to it must already exist.

func CopyFile

func CopyFile(src, dst string) (rErr error)

CopyFile copies the file at src to dst. src must specify a regular file (non-directory, no special mode) that exists, and dst must specify a path that does not yet exist, but whose parent directory does exist. The copied file will have the same permissions as the original.

func GodelDistLayout

func GodelDistLayout(version string, mode s.Mode) (s.SpecDir, error)

func GodelHomePath

func GodelHomePath() (string, error)

GodelHomePath returns the path to the gödel home directory. If $GODEL_HOME is set as an environment variable, that value is used. Otherwise, the value is "$HOME/{{defaultGodelHome}}"

func GodelHomeSpec

func GodelHomeSpec() s.LayoutSpec

func GodelHomeSpecDir

func GodelHomeSpecDir(mode s.Mode) (s.SpecDir, error)

func Move

func Move(src, dst string) error

Move the file or directory at src to dst. Conceptually, this is equivalent to executing "mv src dst". dst must not already exist and the path up to it must already exist. Uses os.Rename to execute the move, which means that there may be platform-specific restrictions such as not being able to move the directory between different volumes.

func SyncDir

func SyncDir(srcDir, dstDir string, skip []string) (bool, error)

SyncDir syncs the contents of the provided directories such that the content of dstDir matches that of srcDir (except for files that match a name in the provided skip slice).

func SyncDirAdditive

func SyncDirAdditive(src, dst string) error

SyncDirAdditive copies all of the files and directories in src that are not in dst. Directories that are present in both are handled recursively. Basically a recursive merge with source preservation.

func VerifyDirExists

func VerifyDirExists(dir string) error

func WrapperSpec

func WrapperSpec() s.LayoutSpec

Types

This section is empty.

Jump to

Keyboard shortcuts

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