filesystem

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DataPath is the root folder for cve storage
	DataPath = "data"

	// KeyPath is the directory in which keys are stored
	KeyPath = "signature"

	// LicensePath is the name of the license file stored in local
	LicensePath = "LICENSE"
)

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(path string) error

CreateDir makes a directory at the given path

func CreateFile

func CreateFile(path string) (*os.File, error)

CreateFile creates a file in a given path if it does not exist

func FileExists

func FileExists(path string) bool

FileExists checks if a file exists at the specified path

func GetDataPath

func GetDataPath(path string) string

GetDataPath returns the data path joined with the base path

func GetKeyPath

func GetKeyPath(path string) string

GetKeyPath returns the key path joined with the base path

func GetPubKey

func GetPubKey(path string) ([]string, error)

GetPubKey walks the path and finds all gpg public armored keys in that directory (that ends with .asc)

func IsDir

func IsDir(path string) bool

IsDir checks if a directory exists

func IsFile

func IsFile(path string) bool

IsFile checks if a file exists

func ParsePath

func ParsePath(path string) (string, string, string, bool)

ParsePath returns the root, bugID, filename of the given filepath

func SplitPath

func SplitPath(path string) (string, string)

SplitPath returns the directory name and the filename of a given path

Types

This section is empty.

Jump to

Keyboard shortcuts

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