It returns the directory structure along with sub-directories and file with thieir name,path.type etc
xdmp:filesystem-directory("C:\ABC\0000001\EXPORT")
returns the following file structure
<dir:directory xsi:schemaLocation="http://marklogic.com/xdmp/directory directory.xsd" xmlns:dir="http://marklogic.com/xdmp/directory" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dir:entry>
<dir:filename>0000001-0000000-0000002-ISDA-MAG-MC02_2011-06-27_04-59-01-206.xml</dir:filename>
<dir:pathname>C:\ABC\0000001\EXPORT\0000001-0000000-0000002-ISDA-MAG-MC02_2011-06-27_04-59-01-206.xml</dir:pathname>
<dir:type>file</dir:type>
<dir:content-length>75087</dir:content-length>
<dir:last-modified>2012-08-24T15:38:24+05:30</dir:last-modified>
</dir:entry>
<dir:entry>
<dir:filename>docslist.xml</dir:filename>
<dir:pathname>C:\ABC\0000001\EXPORT\docslist.xml</dir:pathname>
<dir:type>file</dir:type>
<dir:content-length>133</dir:content-length>
<dir:last-modified>2012-08-24T15:38:24+05:30</dir:last-modified>
</dir:entry>
</dir:directory>
Points:
->Here dir:directory specify the directory and not considered as the root of document so if we run command like : xdmp:filesystem-directory("C:\ColossusImportExport\0000001\EXPORT")/dir:directory
then it returns an empty sequence.here dir:filename is the root of structure.
->the uri path "C:\ABC\0000001\EXPORT" is case insensitive.
No comments:
Post a Comment