Ignore:
Timestamp:
2013-10-31T11:29:37+13:00 (10 years ago)
Author:
kjdon
Message:

changing some util:: methods to FileUtils:: methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/TextPlugin.pm

    r17739 r28563  
    163163    $tmp_dirname = $ENV{'GSDLHOME'};
    164164    }
    165     $tmp_dirname = &util::filename_cat($tmp_dirname, "tmp");
    166     &util::mk_dir($tmp_dirname) if (!-e $tmp_dirname);
     165    $tmp_dirname = &FileUtils::filenameConcatenate($tmp_dirname, "tmp");
     166    &FileUtils::makeDirectory($tmp_dirname) if (!-e $tmp_dirname);
    167167
    168168    # convert to utf-8 otherwise we have problems with the doc.xml file
     
    171171
    172172    $suffix = lc($suffix);
    173     my $tmp_filename = &util::filename_cat($tmp_dirname, "$tailname$suffix");
     173    my $tmp_filename = &FileUtils::filenameConcatenate($tmp_dirname, "$tailname$suffix");
    174174   
    175175    # Make sure we have the absolute path to the input file
     
    181181    # Now make the softlink,  so we don't accidentally damage the input file
    182182    # softlinking creates a symbolic link to (or, if that's not possible, it makes a copy of) the original
    183     &util::soft_link($input_filename, $tmp_filename, $ensure_path_absolute);
     183    &FileUtils::softLink($input_filename, $tmp_filename, $ensure_path_absolute);
    184184     
    185185    my $verbosity = $self->{'verbosity'};
     
    191191
    192192    #my $output_filename = $tailname$output_ext; #output_ext has to be html!
    193     my $output_filename = &util::filename_cat($tmp_dirname, $tailname.".html");
     193    my $output_filename = &FileUtils::filenameConcatenate($tmp_dirname, $tailname.".html");
    194194   
    195195    # Read contents of text file line by line into an array
     
    227227
    228228    # remove the copy of the original file/remove the symbolic link to original file
    229     &util::rm($tmp_filename);
     229    &FileUtils::removeFiles($tmp_filename);
    230230
    231231    return $output_filename; # return the output file path
Note: See TracChangeset for help on using the changeset viewer.