Creates a directory in the specified path, including all the necessary top-level directories not existing.
 

1 file.mkdirs

<file.mkdirs>
    <file /> !
</file.mkdirs>
Example

Creates directories in a specified path.

Copy
<xsql-script name='file_mkdirs_sample1'>
    <body>
        <set name='m_directory'>
            <string>c:<file.separator />tmp<file.separator />destination<file.separator />Barcelona</string>
        </set>
        <println>Name of the directories to create: destination<file.separator />Barcelona</println>
        <set name='m_result'>
            <file.mkdir>
                <file name='#m_directory' type='absolute' />
            </file.mkdir>
        </set>
        <if>
            <expr>
                <eq>
                    <m_result/>
                    1
                </eq>
            </expr>
            <then>
                <set name='m_word'>success</set>
            </then>
            <else>
                <set name='m_word'>failure</set>
            </else>
        </if>
        <println>Result of the creation <m_word/></println>
    </body>
</xsql-script>