Verify if it is possible to write in a file.
 

1 file.canWrite

<file.canWrite>
    <file /> !
</file.canWrite>
Example

Verify if it is possible to write in a file.

Copy
<xsql-script name='file_canWrite_sample1'>
    <body>
        <set name='m_path'>
            <string>c:<file.separator />tmp<file.separator />source<file.separator />deister.txt</string>
        </set>
        <if>
            <expr>
                <file.canWrite>
                    <file name='#m_path' type='absolute' />
                </file.canWrite>
            </expr>
            <then>
                <set name='m_result'>can be written</set>
            </then>
            <else>
                <set name='m_result'>cannot be written</set>
            </else>
        </if>
        <println><m_path/> <m_result/></println>
    </body>
</xsql-script>

c:\tmp\source\deister.txt can be written.