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/dbutil/gdbm.pm

    r23758 r27306  
    2929use strict;
    3030
     31use util;
     32use FileUtils;
    3133use dbutil::gdbmtxtgz;
    3234
     
    4042  my $opt_append = shift(@_);
    4143
    42   my $txt2db_exe = &util::filename_cat($ENV{'GSDLHOME'},"bin",$ENV{'GSDLOS'}, "txt2db" . &util::get_os_exe());
     44  my $txt2db_exe = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'},"bin",$ENV{'GSDLOS'}, "txt2db" . &util::get_os_exe());
    4345  my $infodb_file_handle = undef;
    4446  my $cmd = "\"$txt2db_exe\"";
     
    8486  my $infodb_file_extension = ".gdb";
    8587  my $infodb_file_name = &util::get_dirsep_tail($collection_name) . $infodb_file_extension;
    86   return &util::filename_cat($infodb_directory_path, $infodb_file_name);
     88  return &FileUtils::filenameConcatenate($infodb_directory_path, $infodb_file_name);
    8789}
    8890
Note: See TracChangeset for help on using the changeset viewer.