File::RandomGenerator - Utility to generate a random dir tree with random files.
version 0.06
my $frg = File::RandomGenerator->new; $frg->generate; my $frg = File::RandomGenerator->new( depth => 2, width => 3, num_files => 2, root_dir => '/tmp', unlink => 1, ); $frg->generate;
Max directory depth. Default is 1.
Number of files to create in the root_dir. This number is doubled at each depth level. For example:
/tmp (10 files) /tmp/dir_a (20 files) /tmp/dir_a/dir_b (40 files)
Default is 10.
Directory to put temp files and dirs. Default is /tmp.
Flag to indicate whether or not to unlink the files and directories after the object goes out of scope. Default is 1.
Number of subdirs to create at each depth level.
Constructor, 'nuff said.
Generate files and directories. Returns the number of files created.
John Gravatt <john@gravatt.org>
This software is copyright (c) 2013 by John Gravatt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install File::RandomGenerator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::RandomGenerator
CPAN shell
perl -MCPAN -e shell install File::RandomGenerator
For more information on module installation, please visit the detailed CPAN module installation guide.