Documentation ¶
Index ¶
- Variables
- func CommitDirs(tree *Dir, root string) int
- func CommitNewDefaultRandomTree(t *testing.T) (string, *Dir, DirStats)
- func CommitNewRandomTree(t *testing.T, altRoot string, o TreeOptions, m Mixes) (string, *Dir, DirStats)
- func CommitZonedFilesMixed(rnd1 *xrand.Xrand, rnd2 *xrand.Xrand, files []*File, z Zones, m Mixes, ...) (DirStats, []*File)
- func DirStatsTable() *format.Table
- func NewCloneFileOperation(sbase, dbase string) func(*File, *File)
- func NewDirMakerFactory(base string) func(*Dir)
- func NewFileFromStorageFactory(base string) func(Entry) *File
- func NewLinkFileOperation(sbase, dbase string) func(*File, *File)
- func NewRandomFileFactory(rnd *xrand.Xrand, base string, sizeFactory func() int) func(*File)
- func NewRandomNameFactory(rnd *xrand.Xrand, sizeFactory func() int, charSet string) func() string
- func ShuffleFiles(rnd *xrand.Xrand, f []*File)
- func TempDir(t *testing.T, altName string) string
- type Dir
- func (d *Dir) AllDirsMap() map[string]*Dir
- func (d *Dir) AllDirsSlice() []*Dir
- func (d *Dir) AllFilesMap() map[string]*File
- func (d *Dir) AllFilesSlice() []*File
- func (d *Dir) Compare(o *Dir) bool
- func (d *Dir) Dump(outFile string)
- func (d *Dir) EachDir(cb func(*Dir))
- func (d *Dir) EachDirRecursive(cb func(*Dir)) (count int)
- func (d *Dir) EachFile(cb func(*File))
- func (d *Dir) EachFileRecursive(cb func(*File))
- func (d *Dir) EachRecursive(fcb func(*File), dcb func(*Dir))
- func (d *Dir) RemoveFiles(files []*File)
- func (d *Dir) Sort()
- type DirFactory
- type DirStats
- type DirsFactory
- type Entry
- type EntryFactory
- type File
- type FileFactory
- type FilesFactory
- type MinMax
- type Mixes
- type TreeOptions
- type Zones
Constants ¶
This section is empty.
Variables ¶
View Source
var LowerCaseChars, ValidChars string
Functions ¶
func CommitDirs ¶
func CommitNewRandomTree ¶
func CommitZonedFilesMixed ¶
func CommitZonedFilesMixed(rnd1 *xrand.Xrand, rnd2 *xrand.Xrand, files []*File, z Zones, m Mixes, root string, stage2 bool) (DirStats, []*File)
Commits files from a tree returns the files which have not been committed (excluded)
func DirStatsTable ¶
func NewCloneFileOperation ¶
func NewDirMakerFactory ¶
func NewLinkFileOperation ¶
func NewRandomFileFactory ¶
func NewRandomNameFactory ¶
func ShuffleFiles ¶
Types ¶
type Dir ¶
func NewDirFromStorage ¶
func NewRandomTree ¶
func NewRandomTree(rnd *xrand.Xrand, o TreeOptions) *Dir
func NewRandomTree2 ¶
func NewRandomTree2(rnd *xrand.Xrand, o TreeOptions) (*Dir, func() string)
returns also the name factory
func (*Dir) AllDirsMap ¶
func (*Dir) AllDirsSlice ¶
func (*Dir) AllFilesMap ¶
func (*Dir) AllFilesSlice ¶
func (*Dir) EachDirRecursive ¶
func (*Dir) EachFileRecursive ¶
func (*Dir) EachRecursive ¶
type DirFactory ¶
func NewDirFactory ¶
func NewDirFactory(entryFactory EntryFactory, filesFactory FilesFactory, dirsFactory DirsFactory) DirFactory
type DirStats ¶
func CommitFilesMixed ¶
type DirsFactory ¶
func NewDirsFactory ¶
func NewDirsFactory(maxDepth int, countFactory func() int) (DirsFactory, func(DirFactory))
func NullDirsFactory ¶
func NullDirsFactory() DirsFactory
type EntryFactory ¶
func NewEntryFactory ¶
func NewEntryFactory(nameFactory func() string) EntryFactory
func NullEntryFactory ¶
func NullEntryFactory() EntryFactory
type FileFactory ¶
func NewFileFactory ¶
func NewFileFactory(entryFactory EntryFactory) FileFactory
type FilesFactory ¶
func NewFilesFactory ¶
func NewFilesFactory(fileFactory FileFactory, countFactory func() int) FilesFactory
func NullFilesFactory ¶
func NullFilesFactory() FilesFactory
type Mixes ¶
type Mixes struct { MaxSize int // in % - what remains are unique files Created, Cloned, Linked int }
func DefaultMixes ¶
func DefaultMixes() Mixes
type TreeOptions ¶
type TreeOptions struct { CharSet string CharCount MinMax FileCount MinMax DirCount MinMax Depth int }
func DefaultTreeOptions ¶
func DefaultTreeOptions() TreeOptions
func FlatTreeOptions ¶
func FlatTreeOptions(minFiles, maxFiles int) TreeOptions
Click to show internal directories.
Click to hide internal directories.