fs

package
Version: v0.0.0-...-e689ca2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 8 Imported by: 7

Documentation

Overview

Package fs provides filesystem-related functions.

Index

Constants

View Source
const (
	// DirMode is the default permission used when creating directories
	DirMode = 0755
	// FileMode is the default permission used when creating files
	FileMode = 0644
)

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dest string) error

CopyDir is a utility to assist with copying a directory from src to dest. Note that directory permissions are not maintained, but the permissions of the files in those directories are.

func CopyFile

func CopyFile(src, dest string) error

CopyFile is a utility to assist with copying a file from src to dest. Note that file permissions are maintained.

func Gopath

func Gopath() string

Gopath will return the current GOPATH as set by environment variables and will fall back to ~/go if a GOPATH is not set.

func UntarBundle

func UntarBundle(destination string, source string) error

UntarBundle will untar a source tar.gz archive to the supplied destination. Note that this calls `filepath.Dir(destination)`, which has the effect of stripping the last component from destination.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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