File Updater.lua

Functions

Updater:isCopyExcluded (f) Determine if a particular sub-path is to be excluded from copying from source of update to target.
Updater:isPurgeExcluded (f) Determine if a particular sub-path is to be excluded from purging from updated target.
Updater:migratePrefsAndSets (subdir) Migrate plugin preferences.
Updater:migrateSpecials () Migrate special plugin files.
Updater:new (t) Constructor for new instance object.
Updater:newClass (t) Constructor for extending class.
Updater:syncTree () Sync source tree to target tree.
Updater:updatePlugin () Updates plugin to new version (must be already downloaded/available).


Functions

Updater:isCopyExcluded (f)
Determine if a particular sub-path is to be excluded from copying from source of update to target.

Parameters:

  • f: sub-path relative to lrplugin dir
Updater:isPurgeExcluded (f)
Determine if a particular sub-path is to be excluded from purging from updated target.

Parameters:

  • f: sub-path relative to lrplugin dir
Updater:migratePrefsAndSets (subdir)
Migrate plugin preferences.

Parameters:

  • subdir:

Usage:

    Default implementation simply transfers plugin preference backing files.
    Override in extended class to translate legacy preferences (backed or reglar) to new, if desired.

Return value:

    number of errors encountered.
Updater:migrateSpecials ()
Migrate special plugin files.

Usage:

    In case some files require special handling instead of just copying.
    Prime examples are auto-generated metadata module files.
    Excludes preferences which are handled more specifically (see migrate-prefs method).
Updater:new (t)
Constructor for new instance object.

Parameters:

  • t: initial table - optional.

Usage:

    Construct new updater with the default of no copy exclusions, and excluding preferences from being seen as extraneous and purging. 
Updater:newClass (t)
Constructor for extending class.

Parameters:

  • t: initial table - optional.
Updater:syncTree ()
Sync source tree to target tree.
Updater:updatePlugin ()
Updates plugin to new version (must be already downloaded/available).

Valid XHTML 1.0!