Shows how to process files stored in the virtual disk of Axional Studio (disktool) using the XSQL-Script file commands.

1 Access to disktool

<xsql-script name='digest-disktool'>

        <!-- Function example to the process of the line of a file -->
        <function name='local_digest'>
                <arg name='p_file' />
                <!-- Generates a line reader on the file -->
                <set name='m_reader'>
                        <p_file />

                <!-- For each line of the file, print the number of line and its content -->
                            <set name='p_line'>

        <!-- Get an array with the file names of the disk of the folder called 'test 1' -->
        <set name='m_list'>
            <file.listFiles><file name='/test 1' type='disktool' /></file.listFiles>

        <!-- For each file of the root directory, shows its properties -->
        <iterator name='m_file'>
                <m_list />
                        <println>Processing file <file.getName><m_file/></file.getName></println>
                            <m_file />