dir

package
v0.0.0-...-dd95ca6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package dir contains logic related to interacting with directories on the filesystem during the the pkb interactions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateParentDirectories

func CreateParentDirectories(outputPath string) error

CreateParentDirectories creates the parent directories for the rendered file if they don't already exist.

func GetAllFilesInDirectory

func GetAllFilesInDirectory(dir string) ([]string, error)

GetAllFilesInDirectory returns a slice of all of the files in a given directory.

func GetSubDirectories

func GetSubDirectories(parent string) ([]string, error)

GetSubDirectories returns a slice of the sub driectories of the provided parent path.

Types

type Error

type Error uint

Error is the error type.

const (
	// ErrNoSubDirectories is the error thrown when no sub directories exist in
	// the specified parent directory.
	ErrNoSubDirectories Error = iota
)

func (Error) Error

func (e Error) Error() string

Error returns the string message for the given error.

Jump to

Keyboard shortcuts

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