Loading TOC...

MarkLogic 9 Product Documentation
xdmp:filesystem-directory-create

xdmp:filesystem-directory-create(
   $pathname as xs:string,
   [$options as element()?|map:map?]
) as empty-sequence()

Summary

Creates the directory specified by pathname. Returns the empty sequence upon success.

Parameters
pathname Pathname of the directory to be created.
$options An options node in the xdmp:filestystem-directory-create namespace. If create-parents is true, then if necessary it will create the parent directories all the way down to the final directory in the path. If false it will merely complain that the parents do not exist. The default for create-parents is false. You can optionally specify a map with a key of createParents and a boolean value.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-filesystem-directory-create

Example

  xdmp:filesystem-directory-create("/mydata/datafiles/newdir")
  => ()

Example

xdmp:filesystem-directory-create("/mydata/datafiles/newdir",
  <options xmlns="xdmp:filesystem-directory-create">
     <create-parents>true</create-parents>
  </options>)

Example

xdmp:filesystem-directory-create("/mydata/datafiles/newdir",
  map:new(map:entry("createParents", fn:false())))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.