internal

package
v0.0.0-...-7dc7b4a Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2016 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rel

func Rel(path string) string

Rel strips the leading "/" prefix from the path string, effectively turning an absolute path into one relative to the root directory. A path that is just "/" is treated specially, returning just ".".

The elements in a file path are separated by slash ('/', U+002F) characters, regardless of host operating system convention.

func ScriptFile

func ScriptFile(prefix string) (filePath string, rootPath string, err error)

Constructs platform-specific temporary script file with a given prefix On Windows such a file must have .bat extension Returns triplet where - filePath is a location of file - rootPath refers to temporary root directory the filePath is in (everything under the rootPath (including rootPath) should be removed when no longer needed) - error indicates possible error

func WriteFileWithPermissions

func WriteFileWithPermissions(file string, content []byte, perm os.FileMode) error

Wrapper around ioutil.WriteFile that updates permissions regardless if file existed before

Types

This section is empty.

Jump to

Keyboard shortcuts

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