Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir interface { // Create a new directory under the current. // // The TempDir implementation will add a nonce to prevent problems // if a directory already exists with this name. The PersistentDir implementation // will just fail hard if a directory already exists. NewDir(name string) (Dir, error) Path() string TearDown() error }
An interface for creating and deleting directories.
type PersistentDir ¶
type PersistentDir struct {
// contains filtered or unexported fields
}
An implementation of Dir more suitable for directories that need to persist.
func NewPersistentDir ¶
func NewPersistentDir(path string) (*PersistentDir, error)
func (*PersistentDir) Path ¶
func (d *PersistentDir) Path() string
func (*PersistentDir) TearDown ¶
func (d *PersistentDir) TearDown() error
type TempDir ¶
type TempDir struct {
// contains filtered or unexported fields
}
TempDir holds a temp directory and allows easy access to new temp directories.
func NewDirAtRoot ¶
NewDir creates a new TempDir at the given root.
func NewDirAtSlashTmp ¶
NewDirAtSlashTmp creates a new TempDir at /tmp
func (*TempDir) NewDeterministicDir ¶
Click to show internal directories.
Click to hide internal directories.