Index: /main/trunk/greenstone2/bin/script/wvware.pl
===================================================================
--- /main/trunk/greenstone2/bin/script/wvware.pl	(revision 27518)
+++ /main/trunk/greenstone2/bin/script/wvware.pl	(revision 27519)
@@ -40,4 +40,5 @@
 use strict;
 use util;
+use FileUtil;
 
 # Are we running on WinNT or Win2000 (or later)?
@@ -80,10 +81,10 @@
 	# my $extdesc = "the GNOME support library extension";
 
-	my $extdir = &util::filename_cat($ENV{'GSDLHOME'},"ext");
-	my $gnome_dir = &util::filename_cat($extdir, "gnome-lib-minimal");
+	my $extdir = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'},"ext");
+	my $gnome_dir = &FileUtils::filenameConcatenate($extdir, "gnome-lib-minimal");
 	if(-d $gnome_dir) {
 	    $ENV{'GEXTGNOME'} = $gnome_dir;
 	} else {
-	    $gnome_dir = &util::filename_cat($extdir, "gnome-lib");
+	    $gnome_dir = &FileUtils::filenameConcatenate($extdir, "gnome-lib");
 	    if(-d $gnome_dir) {
 		$ENV{'GEXTGNOME'} = $gnome_dir;
@@ -97,10 +98,10 @@
 
 	if (defined $ENV{'GEXTGNOME'}) {
-	    $ENV{'GEXTGNOME_INSTALLED'}=&util::filename_cat($ENV{'GEXTGNOME'}, $ENV{'GSDLOS'});
+	    $ENV{'GEXTGNOME_INSTALLED'}=&FileUtils::filenameConcatenate($ENV{'GEXTGNOME'}, $ENV{'GSDLOS'});
 	    
-	    &util::envvar_prepend("PATH", &util::filename_cat($ENV{'GEXTGNOME_INSTALLED'}, "bin"));
+	    &util::envvar_prepend("PATH", &FileUtils::filenameConcatenate($ENV{'GEXTGNOME_INSTALLED'}, "bin"));
 	    
 	    # util's prepend will create LD/DYLD_LIB_PATH if it doesn't exist yet
-	    my $gextlib = &util::filename_cat($ENV{'GEXTGNOME_INSTALLED'}, "lib");
+	    my $gextlib = &FileUtils::filenameConcatenate($ENV{'GEXTGNOME_INSTALLED'}, "lib");
 	    if($ENV{'GSDLOS'} eq "linux") {
 		&util::envvar_prepend("LD_LIBRARY_PATH", $gextlib);
@@ -122,11 +123,11 @@
     # RUN WVWARE
 
-    my $wvWare = &util::filename_cat($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wvWare");
-
-    my $wvware_folder = &util::filename_cat($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wv");
+    my $wvWare = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wvWare");
+
+    my $wvware_folder = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wv");
     if ( -d $wvware_folder && $ENV{'GSDLOS'} eq "linux" ) {
-	&util::envvar_prepend("PATH", &util::filename_cat($wvware_folder, "bin"));
-
-	my $wvwarelib = &util::filename_cat($wvware_folder, "lib");
+	&util::envvar_prepend("PATH", &FileUtils::filenameConcatenate($wvware_folder, "bin"));
+
+	my $wvwarelib = &FileUtils::filenameConcatenate($wvware_folder, "lib");
 	if($ENV{'GSDLOS'} eq "linux") {
 	    &util::envvar_prepend("LD_LIBRARY_PATH", $wvwarelib);
@@ -134,5 +135,5 @@
 	   # &util::envvar_prepend("DYLD_LIBRARY_PATH", $wvwarelib);
 	#}
-        $wvWare = &util::filename_cat($wvware_folder, "bin", "wvWare");
+        $wvWare = &FileUtils::filenameConcatenate($wvware_folder, "bin", "wvWare");
     }
 
@@ -142,5 +143,5 @@
     $wvWare = "wvWare" if ($ENV{'GSDLOS'} =~ m/^windows$/i);
 
-    my $wv_conf = &util::filename_cat($ENV{'GSDLHOME'}, "etc", 
+    my $wv_conf = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "etc", 
 				      "packages", "wv", "wvHtml.xml");
     
@@ -185,5 +186,5 @@
     # would generate ($windows_scripting) when it converts from word to html.
     # That is, foldername=docname_files
-    my $assoc_dir = &util::filename_cat($toppath, $docname."_files");
+    my $assoc_dir = &FileUtils::filenameConcatenate($toppath, $docname."_files");
     #print "assoc_dir: ".$assoc_dir."\n";  # same as "$output_filestem._files"
     
@@ -191,10 +192,10 @@
     # if it exists already, just delete and recreate
     if(-e $assoc_dir) { 
-	&util::rm_r($assoc_dir);
+	&FileUtils::removeFilesRecursive($assoc_dir);
     }  
-    &util::mk_dir($assoc_dir);
+    &FileUtils::makeDirectory($assoc_dir);
 
     # the images are all going to be called image0, image1,..., imageN
-    my $img_basenames = &util::filename_cat($assoc_dir, $docname);
+    my $img_basenames = &FileUtils::filenameConcatenate($assoc_dir, $docname);
     
     #print STDERR "****toppath: $toppath\n****docname: $docname\n;
@@ -254,11 +255,11 @@
 	close(TMP);
 	if ($line && $line =~ m/DOCTYPE HTML/) {
-	    &util::rm("$output_filestem.err") if -e "$output_filestem.err";    
+	    &FileUtils::removeFiles("$output_filestem.err") if -e "$output_filestem.err";    
 
 	    # Inserted this code to remove the images directory if it was still empty after 
 	    # the html was generated (in case there were no images in the word document)
-	    if (&util::is_dir_empty($assoc_dir)) {
+	    if (&FileUtils::isDirectoryEmpty($assoc_dir)) {
 		#print STDERR "***gsConvert.pl: Image dir $assoc_dir is empty, removing***\n";
-		&util::rm_r($assoc_dir);
+		&FileUtils::removeFilesRecursive($assoc_dir);
 	    } else { # there was an image folder (it was generated)
 		# Therefore, the html file generated contains absolute links to the images
@@ -271,5 +272,5 @@
 	
     # If here, an error of some sort occurred
-    &util::rm("$output_filestem.html") if -e "$output_filestem.html";
+    &FileUtils::removeFiles("$output_filestem.html") if -e "$output_filestem.html";
     if (-e "$output_filestem.err") {
 	if ($faillogfile ne "" && defined(open(FAILLOG,">>$faillogfile"))) {
@@ -279,5 +280,5 @@
 	    close ERRLOG;
 	}
-	&util::rm("$output_filestem.err");
+	&FileUtils::removeFiles("$output_filestem.err");
     }
     
@@ -362,5 +363,5 @@
     # delete the original file and recreate it
     my $copy_of_filename = $html_file;
-    &util::rm($copy_of_filename); # deleted the file
+    &FileUtils::removeFiles($copy_of_filename); # deleted the file
 
     # Recreate the original file for writing the updated contents
Index: /main/trunk/greenstone2/perllib/plugins/ImageConverter.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/ImageConverter.pm	(revision 27518)
+++ /main/trunk/greenstone2/perllib/plugins/ImageConverter.pm	(revision 27519)
@@ -33,4 +33,5 @@
 
 use util;
+use FileUtils;
 use gsprintf 'gsprintf';
 
@@ -232,5 +233,5 @@
     # check the size of the image against minimum size if specified
     my $minimumsize = $self->{'minimumsize'};
-    if (defined $minimumsize && (-s $filename_full_path < $minimumsize)) {
+    if (defined $minimumsize && (&FileUtils::fileSize($filename_full_path) < $minimumsize)) {
         print $outhandle "ImageConverter: \"$filename_full_path\" too small, skipping\n"
 	    if ($verbosity > 1);
@@ -319,5 +320,5 @@
     #overwrite the ones added in BasePlugin
     $doc_obj->set_metadata_element ($section, "FileFormat", $type);
-    my $sys_file_size = -s $filename_full_path;
+    my $sys_file_size = &FileUtils::fileSize($filename_full_path);
     $doc_obj->set_metadata_element ($section, "FileSize",   $sys_file_size); #$image_size);
 
