6. p:file-mkdir

The p:file-mkdir step creates a directory.

<p:declare-step type="p:file-mkdir">
     <p:output port="result" primary="true" content-types="application/xml"/>
     <p:option name="href" required="true" as="xs:anyURI"/>        
     <p:option name="fail-on-error" as="xs:boolean" select="true()"/>
</p:declare-step>

The p:file-mkdir create the directory named in the href option. If this includes more than one directory component, all of the intermediate components are created. The path separator is implementation-defined.

Conformant processors must support URIs whose scheme is file for the href option of p:file-mkdir. It is implementation-defined what other schemes are supported by p:file-mkdir, and what the interpretation of ‘directory’, ‘file’ and ‘contents’ is for those schemes. It is a dynamic error (err:XC0140) if an implementation does not support p:file-mkdir for a specified scheme.

If href is relative, it is made absolute against the base URI of the element on which it is specified (p:with-option or p:file-mkdir in the case of a syntactic shortcut value). It is a dynamic error (err:XD0064) if the base URI is not both absolute and valid according to [RFC 3986]. It is a dynamic error (err:XC0141) if p:file-mkdir not available to the step due to access restrictions in the environment in which the pipeline is run.

If the create is successful, the step returns a c:result element containing the absolute URI of the directory created.

If an error occurs and fail-on-error is false, the step returns a c:error element which may contain additional, implementation-defined, information about the nature of the error.

If an error occurs and fail-on-error is true, the following error is raised:

Document properties

The resulting document has no properties apart from content-type. In particular, it has no base-uri.