Changeset 23249 for main/trunk/greenstone2/perllib/util.pm
- Timestamp:
- 2010-10-29T15:00:58+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/util.pm
r22886 r23249 59 59 } 60 60 61 # removes files (but not directories) - can rename this to the default 62 # "rm" subroutine when debugging the deletion of individual files. 63 sub rm_debug { 64 my (@files) = @_; 65 my @filefiles = (); 66 67 # make sure the files we want to delete exist 68 # and are regular files 69 foreach my $file (@files) { 70 if (!-e $file) { 71 print STDERR "util::rm $file does not exist\n"; 72 } elsif ((!-f $file) && (!-l $file)) { 73 print STDERR "util::rm $file is not a regular (or symbolic) file\n"; 74 } else { # debug message 75 unlink($file) or warn "Could not delete file $file: $!\n"; 76 } 77 } 78 } 61 79 62 80
Note:
See TracChangeset
for help on using the changeset viewer.