Name

p:file-move — The standard p:file-move step.

Synopsis

The p:file-move step moves a file or directory.

Output portPrimarySequenceContent types
result✔  application/xml 
Option nameTypeDefault valueRequired
hrefxs:anyURI ✔ 
targetxs:anyURI ✔ 
fail-on-errorxs:booleantrue() 
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
  |   <p:output port="result" primary="true" content-types="application/xml"/>
  |   <p:option name="href" required="true" as="xs:anyURI"/>
  |   <p:option name="target" required="true" as="xs:anyURI"/>
5 |   <p:option name="fail-on-error" as="xs:boolean" select="true()"/>
  |</p:declare-step>
Errors
CodeDescription
err:XC0050It is a dynamic error (err:XC0050) if the directory cannot be moved to the specified location.
err:XC0115It is a dynamic error (err:XC0115) if the resource referenced by the target option is an existing file or other file system object.
err:XC0148It is a dynamic error (err:XC0148) if an implementation does not support p:file-move for a specified scheme.
err:XC0149It is a dynamic error (err:XC0149) if p:file-move is not available to the step due to access restrictions in the environment in which the pipeline is run.
err:XC0158It is a dynamic error (err:XC0158) if the href option names a directory, but the target option names a file.
err:XD0011It is a dynamic error (err:XD0011) if the resource referenced by the href option does not exist, cannot be accessed or is not a file or directory.
err:XD0064It is a dynamic error (err:XD0064) if the base URI is not both absolute and valid according to RFC 3986.
Implementation defined features
  • Conformant processors must support URIs whose scheme is file for the href and target options of p:file-move. It is implementation-defined what other schemes are supported by p:file-move, and what the interpretation of ‘directory’, ‘file’ and ‘contents’ is for those schemes.

Description

The p:file-move step is defined in the XProc 3.1: Standard Step Library. It is also described on XProcRef.org.