Changeset 81
- Timestamp:
- 11/30/05 14:22:52 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/soft/ObsData/ObsData/Repository.pm
- Property cvs2svn:cvs-rev changed from 1.20 to 1.21
r78 r81 100 100 our @ISA = qw(ObsData::Repository); 101 101 102 my $status_default = { 103 archive_new => 1, 104 archive_time => 0, 105 archive_size => 0, 106 107 data_new => 1, 108 data_configmtime => 0, 109 110 }; 111 102 112 sub new { 103 113 my ($class, $parent, $archivefile) = @_; … … 106 116 107 117 $ORa->{archivefile} = $archivefile; 118 119 $ORa->{statusinfo} = {}; 108 120 109 121 bless($ORa, $class); … … 115 127 # $self->SUPER::DESTROY(); 116 128 #} 129 130 sub status { 131 my ($self) = @_; 132 133 my @filestats = stat("$self->{dir}/$self->{archivefile}"); 134 135 if ($self->{status}->SectionExists($self->{archivefile})) { 136 } else { 137 $self->{statusinfo}{archive_new} = 138 $self->loging(0, "%s is new files", $self->{archivefile}); 139 } 140 } 117 141 118 142 # TODO Define return code for this function, storing result somewhere to … … 191 215 } else { 192 216 $self->loging(0, "%s is new files", $self->{archivefile}); 193 $self->{status}->AddSection($self->{archivefile});194 217 $self->update_status; 195 218 return 1; … … 200 223 my ($self) = @_; 201 224 my @filestats = stat("$self->{dir}/$self->{archivefile}"); 202 225 if (!$self->{status}->SectionExists($self->{archivefile})) { 226 $self->{status}->AddSection($self->{archivefile}); 227 } 203 228 $self->{status}->newval($self->{archivefile}, 'mtime', $filestats[9]); 204 229 $self->{status}->newval($self->{archivefile}, 'size', $filestats[7]);
Note: See TracChangeset
for help on using the changeset viewer.