Diff for /foxridge-archiver/MPIWGStor.pm between versions 1.1 and 1.2

version 1.1, 2004/06/17 15:58:42 version 1.2, 2005/01/21 14:33:26
Line 13  use vars qw(@ISA @EXPORT $VERSION Line 13  use vars qw(@ISA @EXPORT $VERSION
         $file_perm);          $file_perm);
 use Exporter;  use Exporter;
   
 $VERSION = 0.3; #  ROC 24.9.2003  $VERSION = 0.4; #  ROC 20.1.2005
   
 @ISA = qw(Exporter);  @ISA = qw(Exporter);
   
 @EXPORT = qw($debug %junk_files %index_files $index_file_perm $archived_index_file_perm   @EXPORT = qw($debug %junk_files %index_files $index_file_perm $archived_index_file_perm 
          $file_perm           $file_perm
          &parseargs &logger &stime  &s2stime &ymd_date &split_file_path &sstrip            &parseargs &logger &stime  &s2stime &ymd_date &split_file_path &sstrip 
          &valid_file_name &valid_dir_name &read_xml &write_xml);           &valid_file_name &valid_dir_name &park_file &unpark_file &read_xml &write_xml);
   
 # debug level  # debug level
 $debug = 0;  $debug = 0;
Line 211  sub valid_name { Line 211  sub valid_name {
   
   
 #  #
   # $newfilename = park_file($filename)
   #
   # parks a file under a new name (*.bak)
   #
   sub park_file {
       my ($filename) = @_;
       my $newfn = "";
       if (-f $filename) {
       $newfn = "$filename.bak";
       if (! rename $filename, $newfn) {
           logger("ABORT", "unable to rename file $filename!");
           exit 1;
       }
       }
       return $newfn;
   }
       
   #
   # $filename = unpark_file($filename)
   #
   # unparks a file
   #
   sub unpark_file {
       my ($filename) = @_;
       my $newfn = "$filename.bak";
       if (-f $newfn) {
       if (! rename $newfn, $filename) {
           logger("ABORT", "unable to rename file $newfn!");
           exit 1;
       }
       return $filename;
       }
       return "";
   }
       
   
   
   #
 # ($document, $rootnode) = read_xml($file)  # ($document, $rootnode) = read_xml($file)
 #  #
 # reads xml meta file $file  # reads xml meta file $file

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>