Ignore:
Timestamp:
2016-12-09T21:24:55+13:00 (7 years ago)
Author:
ak19
Message:

This commit is related to but not specific to the upcoming commit to do with the new oaiinfo db and its directly affected files. This commit: New remove and rename (move) methods in DB package to clean up main db file and any additional db files created by any specific infodbtype. The new methods in dbutil/jdbm.pm are not called, for some reason. Requires more investigation, but committing for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/DBDrivers/BaseDBDriver.pm

    r30517 r31188  
    344344
    345345
     346## @function rename_db_file_to(string, string) => void
     347#
     348sub rename_db_file_to {
     349    my $self = shift(@_);
     350    my ($srcpath, $destpath) = @_;
     351
     352    # rename basic db file
     353    &FileUtils::moveFiles($srcpath, $destpath);
     354
     355    # subclass should rename any additional files that the specific dbtype creates
     356}
     357## rename_db_file_to(string, string) => void ##
     358
     359## @function remove_db_file(string) => void
     360#
     361sub remove_db_file {
     362    my $self = shift(@_);
     363    my ($db_filepath) = @_;
     364   
     365    # remove basic db file
     366    &FileUtils::removeFiles($db_filepath);
     367
     368    # subclass must rename any additional files that the specific dbtype creates (e.g. transaction log files)
     369}
     370## remove_db_file(string, string) => void ##
     371
     372
    346373## @function supportsDatestamp(void) => integer
    347374#
Note: See TracChangeset for help on using the changeset viewer.