BagCreator

BagCreator

BagCreator assembles a bag by copying source files into a bagging directory, writing manifests and tag manifests. This is a thin wrapper around Bagger. It catches events from the underlying bagger, wraps them in JobStatus objects, and writes them to STDOUT and STDERR to communicate with the parent process.

param {Job} - The job to run. The job object must contain a BagItProfile and a PackageOperation to be valid.

Constructor

new BagCreator()

Source:

Methods

errorOnExistingDir(outputPath) → {Error}

errorOnExistingDir causes the bag creator to stop with an error if the directory to which we're writing this bag already exists and contains files. Writing a bag into a non-empty directory will usually cause bag validation to fail, as described in https://github.com/APTrust/dart/issues/280

Parameters:
Name Type Description
outputPath string

The path to which the bag will be written.

Source:

run() → {Promise}

This runs the job's package operation, creating the bag. It returns a promise.

Source: