File-Util
view release on metacpan or search on metacpan
examples/pretty_print_a_directory_using_as_tree.pl view on Meta::CPAN
# ABSTRACT: pretty print a directory, recursively, using list_dir( "as_tree" )
# The fool-proof, dead-simple way to pretty-print a directory tree. Caveat:
# This isn't a method for massive directory traversal, and is subject to the
# limitations inherent in stuffing an entire directory tree into RAM. Go
# back and use bare callbacks (see other examples) if you need a more efficient,
# streaming (real-time) pretty-printer where top-level sorting is less
# important than resource constraints and speed of execution.
# set this to the name of the directory to pretty-print
my $treetrunk = '.';
use warnings;
use strict;
use lib './lib';
use File::Util qw( NL SL );
lib/File/Util/Cookbook.pod view on Meta::CPAN
exit;
=head2 Pretty-Print A Directory Recursively
This is the fool-proof, dead-simple way to pretty-print a directory tree.
Caveat: This isn't a method for massive directory traversal, and is subject to
the limitations inherent in stuffing an entire directory tree into RAM. Go
back and use bare callbacks (see the other example scripts that came in the
"examples" subdirectory of this distribution) if you need a more efficient,
streaming (real-time) pretty-printer where top-level sorting is less important
than resource constraints and speed of execution.
# set this to the name of the directory to pretty-print
my $treetrunk = '.';
use warnings;
use strict;
use lib './lib';
use File::Util qw( NL SL );
( run in 0.476 second using v1.01-cache-2.11-cpan-4d50c553e7e )