create

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathIsFile = errors.New("path already exist as a file")
	ErrPrefix     = errors.New("invalid prefix value, it must be between 0 - 9")
)

Functions

func Dir

func Dir(path string) error

Dir creates a UUID subdirectory in the directory path.

func Holder

func Holder(path string, size int, prefix uint) error

Holder generates a placeholder file filled with random text in the given directory path, the size of the file determines the number of random characters and the prefix is a digit between 0 and 9 is appended to the filename.

func Holders

func Holders(path string, size int, count uint) error

Holders generates a number of placeholder files in the given directory path.

func RandString

func RandString(n int) (string, error)

RandString generates a random string of n characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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