Step fileset-copy {http://www.daisy.org/ns/pipeline/xproc}

Copy a fileset to a new location

Fails if the fileset contains files outside of the base directory. No files are physically copied, that is done upon calling px:fileset-store.

Defined in: http://www.daisy.org/pipeline/modules/fileset-utils/library.xpl

Input Ports

Port Description
source.fileset primary
source.in-memory sequence

The input fileset

Output Ports

Port Description
result.fileset primary
result.in-memory sequence

The output fileset at the new location.

The xml:base is changed to "target". The hrefs are not updated, unless the "flatten" option is set, in which case they are reduced to the file name. The base URI of the in-memory documents are changed accordingly, and "original-href"-attributes are added for files that exist on disk.

mapping

A d:fileset document that contains the mapping from the source files (@original-href) to the copied files (@href).

Options

Local Name Namespace URI Default Description
target required

The target directory.

flatten false()

Move all files to a single directory.

Renames files when needed to avoid that files would overwrite each other.

prefix ''

Prefix to add before file names.

Only if "flatten" option is set.

dry-run false()

Don't actually perform the copy operation, only return the list of intended rename actions on the "mapping" port.