Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The random source fo the generation Src rand.Source // Number of files to generate NumFiles uint64 // The average depth of the folders. AvgDepth uint32 // Chance of new folders, must be between 0 and 1 NewRatio float64 }
A Config describes the parameters used to generate a filetree with the Generate call.
type Node ¶
Node represents a node in a file. If a node does not have any children, it is considered to be a file otherwise it's a directory. This matches the way object stores see the world as their folders are simply constructs.
func (Node) AvgDepth ¶
AvgDepth returns the average depth of the files, as measured from this node. It is important to notice that files in the top level directory have a depth of 1.
Click to show internal directories.
Click to hide internal directories.