App-Glacier
view release on metacpan or search on metacpan
lib/App/Glacier/Command/Sync.pm view on Meta::CPAN
use warnings;
use App::Glacier::Core;
use parent qw(App::Glacier::Command);
use App::Glacier::DateTime;
use App::Glacier::Timestamp;
use App::Glacier::Job::InventoryRetrieval;
use JSON;
=head1 NAME
glacier sync - synchronize vault inventory cache
=head1 SYNOPSIS
B<glacier sync>
[B<-df>]
[B<--delete>]
[B<--force>]
I<VAULT>
=head1 DESCRIPTION
lib/App/Glacier/Directory.pm view on Meta::CPAN
die "all permutations exhausted" if ($i > $namelen);
$name[$i] = ($name[$i] + 1) % @alphabet;
last if $name[$i] != $orig[$i];
}
}
return $s;
}
use constant {
DIR_UPTODATE => 0, # Directory is up to date
DIR_PENDING => 1, # Directory is empty, needs synchronization
DIR_OUTDATED => 2 # Directory needs update
};
sub status {
my ($self) = @_;
if (defined($self->last_sync_time)) {
my $dsc = timestamp_deserialize($self->glacier->Describe_vault($self->vault));
unless ($dsc
&& $dsc->{LastInventoryDate}->epoch < $self->last_sync_time) {
( run in 0.307 second using v1.01-cache-2.11-cpan-05444aca049 )