createdir

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDirectoryFileMode = consts.DefaultDirectoryFileMode
	DefaultFileMode          = consts.DefaultFileMode
)

Variables

This section is empty.

Functions

func All added in v0.1.3

func All(location string, mode os.FileMode) *errorwrapper.Wrapper

func AllDefaultMode added in v0.1.3

func AllDefaultMode(location string) *errorwrapper.Wrapper

func AllOnNonExist added in v0.2.2

func AllOnNonExist(
	location string,
	mode os.FileMode,
) *errorwrapper.Wrapper

func AllRecurse

func AllRecurse(path string, fileMode os.FileMode) *dirinfo.Result

AllRecurse Create all sub-directories and create the final directory

func AllRecurseIf

func AllRecurseIf(
	condition bool,
	path string,
	fileMode os.FileMode,
) *dirinfo.Result

func AllUptoParent added in v0.1.3

func AllUptoParent(location string, mode os.FileMode) *errorwrapper.Wrapper

func AllUptoParentDefault added in v0.3.1

func AllUptoParentDefault(location string) *errorwrapper.Wrapper

func AllUptoParentMany added in v0.3.9

func AllUptoParentMany(mode os.FileMode, locations ...string) *errorwrapper.Wrapper

func AllUptoParentManyDefaultMode added in v0.3.9

func AllUptoParentManyDefaultMode(locations ...string) *errorwrapper.Wrapper

func New

func New(path string, fileMode os.FileMode) *dirinfo.Result

New Create directory and create the final directory

func RemoveCreateAll added in v0.3.1

func RemoveCreateAll(
	isLock,
	isSkipOnExist,
	isRemove,
	isApplyCreate bool,
	location string,
	mode os.FileMode,
) *errorwrapper.Wrapper

Types

type Instruction added in v0.3.1

type Instruction struct {
	Location string
	FileMode os.FileMode // 0 means no apply
	IsLock,
	IsCreate,
	IsSkipOnExist,
	IsRemoveAll bool
}

func (*Instruction) Create added in v0.3.1

func (it *Instruction) Create(mode os.FileMode) *errorwrapper.Wrapper

func (*Instruction) CreateDefault added in v0.3.1

func (it *Instruction) CreateDefault() *errorwrapper.Wrapper

func (*Instruction) CreateIf added in v0.3.2

func (it *Instruction) CreateIf(isCreate bool, mode os.FileMode) *errorwrapper.Wrapper

func (*Instruction) CreateParent added in v0.3.1

func (it *Instruction) CreateParent(mode os.FileMode) *errorwrapper.Wrapper

func (*Instruction) CreateParentIf added in v0.3.2

func (it *Instruction) CreateParentIf(isCreate bool, mode os.FileMode) *errorwrapper.Wrapper

func (*Instruction) FileModeOrDefault added in v0.3.1

func (it *Instruction) FileModeOrDefault() os.FileMode

func (*Instruction) HasFileMode added in v0.3.1

func (it *Instruction) HasFileMode() bool

func (*Instruction) IsDirExist added in v0.3.1

func (it *Instruction) IsDirExist() bool

func (*Instruction) IsExist added in v0.3.1

func (it *Instruction) IsExist() bool

func (*Instruction) ParentDir added in v0.3.1

func (it *Instruction) ParentDir() string

Jump to

Keyboard shortcuts

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