Ignore:
Timestamp:
2013-05-06T15:29:38+12:00 (11 years ago)
Author:
jmt12
Message:

Moving the critical file-related functions (copy, rm, etc) out of util.pm into their own proper class FileUtils. Use of the old functions in util.pm will prompt deprecated warning messages. There may be further functions that could be moved across in the future, but these are the critical ones when considering supporting other filesystems (HTTP, HDFS, WebDav, etc). Updated some key files to use the new functions so now deprecated messages thrown when importing/building demo collection 'out of the box'

File:
1 edited

Legend:

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

    r24351 r27306  
    3131
    3232use util;
     33use FileUtils;
    3334use doc;
    3435use PrintInfo;
     
    120121        my $base_dir =$self->{'base_dir'};
    121122
    122         my $doc_filename = &util::filename_cat($base_dir,$doc_file);
     123        my $doc_filename = &FileUtils::filenameConcatenate($base_dir,$doc_file);
    123124
    124125        my ($doc_tailname, $doc_dirname, $suffix)
     
    229230   
    230231    # see if this has a archives information file within it
    231 ##    my $archive_info_filename = &util::filename_cat($base_dir,$file,"archives.inf");
    232     my $archive_info_filename = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-doc", &util::filename_cat($base_dir, $file));
     232##    my $archive_info_filename = &FileUtils::filenameConcatenate($base_dir,$file,"archives.inf");
     233    my $archive_info_filename = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-doc", &FileUtils::filenameConcatenate($base_dir, $file));
    233234
    234235    if (-e $archive_info_filename) {
     
    254255        last if ($maxdocs != -1 && ($total_count + $count) >= $maxdocs);
    255256
    256         my $tmp = &util::filename_cat ($file, $subfile->[0]);
     257        my $tmp = &FileUtils::filenameConcatenate($file, $subfile->[0]);
    257258        next if $tmp eq $file;
    258259
Note: See TracChangeset for help on using the changeset viewer.