App-Hashl

 view release on metacpan or  search on metacpan

bin/hashl  view on Meta::CPAN


my $add_unignore  = 0;
my $base          = getcwd();
my $rel_paths     = 1;
my $db_file       = '.hashl.db';
my $total         = 0;
my $cur           = 0;
my $show_progress = 1;
my $xdev_fsno;
my @edb_files;
my $timer;
my $incoming_dir;
my $read_size;
my ( $find_ref, $find_db_write );

my $hashl;
my @ehashl;

our $VERSION = '1.01';

STDERR->autoflush(1);

bin/hashl  view on Meta::CPAN

		return;
	}

	if ($rel_paths) {
		$file = substr( $file, length($base) + 1 );
	}

	$cur++;

	if ($show_progress) {
		print STDERR $timer->report(
			"\r\e[2KScanning directory: %p done, %L elapsed, %E remaining",
			$cur, );
	}

	&{$code}( $file, $path );

	if ( $write and ( ( $cur % 5000 ) == 0 ) ) {
		$hashl->save($db_file);
	}

bin/hashl  view on Meta::CPAN

	my ($dir) = @_;

	$dir //= $base;

	if ( not $show_progress ) {
		return;
	}

	find( \&get_total, $dir );

	$timer = Time::Progress->new();
	$timer->attr(
		min => 1,
		max => $total,
	);

	return;
}

sub cmd_copy {
	($incoming_dir) = @_;



( run in 0.649 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )