Changeset 27509 for main/trunk/greenstone2/perllib/plugins
- Timestamp:
- 2013-05-29T20:41:13+12:00 (11 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BaseMediaConverter.pm
r24350 r27509 117 117 } 118 118 119 my $base_output_dir = & util::filename_cat($collect_dir,"cached",$dirname);119 my $base_output_dir = &FileUtils::filenameConcatenate($collect_dir,"cached",$dirname); 120 120 121 121 if (!-e $base_output_dir ) { … … 123 123 if ($verbosity>2); 124 124 125 & util::mk_all_dir($base_output_dir);126 } 127 128 my $output_dir = & util::filename_cat($base_output_dir,$file_root);125 &FileUtils::makeAllDirectories($base_output_dir); 126 } 127 128 my $output_dir = &FileUtils::filenameConcatenate($base_output_dir,$file_root); 129 129 130 130 if (!-e $output_dir) { … … 132 132 if ($verbosity>2); 133 133 134 & util::mk_dir($output_dir);134 &FileUtils::makeAllDirectories($output_dir); 135 135 } 136 136 -
main/trunk/greenstone2/perllib/plugins/ConvertBinaryFile.pm
r26893 r27509 45 45 no strict 'subs'; 46 46 use util; 47 use FileUtils; 47 48 48 49 … … 108 109 my $colplugname = undef; 109 110 if (defined $ENV{'GSDLCOLLECTDIR'}) { 110 $colplugname = & util::filename_cat($ENV{'GSDLCOLLECTDIR'},111 $colplugname = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, 111 112 "perllib","plugins", 112 113 $plugin_package); 113 114 } 114 115 115 my $mainplugname = & util::filename_cat($ENV{'GSDLHOME'},116 my $mainplugname = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, 116 117 "perllib","plugins", 117 118 $plugin_package); … … 255 256 256 257 my $lc_suffix = lc($suffix); 257 my $tmp_filename = & util::filename_cat($tmp_dirname, "$utf8_tailname$lc_suffix");258 my $tmp_filename = &FileUtils::filenameConcatenate($tmp_dirname, "$utf8_tailname$lc_suffix"); 258 259 259 260 # If gsdl is remote, we're given relative path to input file, of the form import/tailname.suffix … … 261 262 # the input_filename is the absolute path, see http://perldoc.perl.org/File/Spec.html 262 263 my $ensure_path_absolute = 1; # true 263 & util::soft_link($input_filename, $tmp_filename, $ensure_path_absolute);264 &FileUtils::softLink($input_filename, $tmp_filename, $ensure_path_absolute); 264 265 my $verbosity = $self->{'verbosity'}; 265 266 if ($verbosity > 0) { … … 267 268 } 268 269 269 my $errlog = & util::filename_cat($tmp_dirname, "err.log");270 my $errlog = &FileUtils::filenameConcatenate($tmp_dirname, "err.log"); 270 271 271 272 # Execute the conversion command and get the type of the result, … … 290 291 291 292 # remove symbolic link to original file 292 & util::rm($tmp_filename);293 &FileUtils::removeFiles($tmp_filename); 293 294 294 295 # Check STDERR here … … 307 308 close ERRLOG; 308 309 } 309 & util::rm("$errlog") if (-e "$errlog");310 &FileUtils::removeFiles("$errlog") if (-e "$errlog"); 310 311 return ""; 311 312 } … … 364 365 } 365 366 else { 366 & util::mv("${conv_filename}.tmp", $conv_filename);367 &FileUtils::moveFiles("${conv_filename}.tmp", $conv_filename); 367 368 } 368 369 } … … 460 461 # associate original file with doc object 461 462 my $cursection = $doc_obj->get_top_section(); 462 my $filename = & util::filename_cat($base_dir, $file);463 my $filename = &FileUtils::filenameConcatenate($base_dir, $file); 463 464 my $assocfilename = "doc.$doc_ext"; 464 465 if ($self->{'keep_original_filename'} == 1) { … … 489 490 if (defined $tmp_dir && -d $tmp_dir) { 490 491 ##print STDERR "**** Suppressing clean up of tmp dir\n"; 491 & util::rm_r($tmp_dir);492 &FileUtils::removeFilesRecursive($tmp_dir); 492 493 $self->{'tmp_dir'} = undef; 493 494 } -
main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm
r26222 r27509 425 425 close BACKUP; 426 426 &File::Copy::copy ($backup_filename, $filename); 427 & util::rm($backup_filename);427 &FileUtils::removeFiles($backup_filename); 428 428 429 429 } … … 643 643 644 644 if ($line =~ /imgfile=\"([^\"]+)\"/) { 645 &util::block_filename($block_hash,& util::filename_cat($dir,$1));645 &util::block_filename($block_hash,&FileUtils::filenameConcatenate($dir,$1)); 646 646 } 647 647 if ($line =~ /txtfile=\"([^\"]+)\"/) { 648 &util::block_filename($block_hash,& util::filename_cat($dir,$1));648 &util::block_filename($block_hash,&FileUtils::filenameConcatenate($dir,$1)); 649 649 } 650 650 } … … 672 672 # find the image file if there is one 673 673 if (defined $imgname && $imgname ne "") { 674 &util::block_filename($block_hash, & util::filename_cat( $dir,$imgname));674 &util::block_filename($block_hash, &FileUtils::filenameConcatenate( $dir,$imgname)); 675 675 } 676 676 # find the text file if there is one 677 677 if (defined $txtname && $txtname ne "") { 678 &util::block_filename($block_hash, & util::filename_cat($dir,$txtname));678 &util::block_filename($block_hash, &FileUtils::filenameConcatenate($dir,$txtname)); 679 679 } 680 680 }
Note:
See TracChangeset
for help on using the changeset viewer.