dirconfig

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExistsOrRecreate

func CheckExistsOrRecreate(log logr.Logger, dirs ...Directory) error

Types

type DirCreateFunc

type DirCreateFunc = func(path string) error

type DirListFunc

type DirListFunc = func(path string) ([]os.FileInfo, error)

type Directory

type Directory struct {
	Path string
	*DirectoryFileSystem
}

func (*Directory) Create

func (dir *Directory) Create() error

func (*Directory) Exists

func (dir *Directory) Exists() bool

func (*Directory) GetFiles added in v0.9.2

func (dir *Directory) GetFiles() ([]string, error)

func (*Directory) GetFilesFullPath added in v0.9.2

func (dir *Directory) GetFilesFullPath() ([]string, error)

func (*Directory) RemoveContents

func (dir *Directory) RemoveContents() error

func (*Directory) String

func (dir *Directory) String() string

type DirectoryConfig

type DirectoryConfig struct {
	Parent  Directory
	Upload  Directory
	Staging Directory
	Reports Directory
	*DirectoryFileSystem
}

DirectoryConfig stores the path for each directory

func (*DirectoryConfig) CheckConfig added in v0.9.2

func (dirCfg *DirectoryConfig) CheckConfig() bool

func (*DirectoryConfig) GetDirectoryConfig

func (dirCfg *DirectoryConfig) GetDirectoryConfig() error

type DirectoryFileSystem

type DirectoryFileSystem struct {
	ListDirectory   DirListFunc
	RemoveAll       RemoveAllFunc
	Stat            StatFunc
	CreateDirectory DirCreateFunc
}

type RemoveAllFunc

type RemoveAllFunc = func(path string) error

type StatFunc

type StatFunc = func(path string) (os.FileInfo, error)

Jump to

Keyboard shortcuts

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