Check if the specified file in the path is a file.

1 file.isFile

<file.isFile>
    <file /> !
</file.isFile>
Example

Check the existence of a file.

Copy
<xsql-script name='file_isFile_sample1'>
    <body>
        <set name='m_path'>
            <string>c:<file.separator />tmp<file.separator />JASLicense.properties</string>
        </set>
        <if>
            <expr>
                <file.isFile>
                    <file name='#m_path' type='absolute' />
                </file.isFile>
            </expr>
            <then>
                <set name='m_result'>file</set>
            </then>
            <else>
                <set name='m_result'>directory</set>
            </else>
        </if>
        <println><m_path/> is a <m_result/></println>
    </body>
</xsql-script>

c:\tmp\JASLicense.properties is a file.

Example

Check the existence of a directory.

Copy
<xsql-script name='file_isFile_sample2'>
   <body>
       <set name='m_path'>
           <string>c:<file.separator />tmp</string>
       </set>
       <if>
           <expr>
               <file.isFile>
                   <file name='#m_path' type='absolute' />
               </file.isFile>
           </expr>
           <then>
               <set name='m_result'>file</set>
           </then>
           <else>
               <set name='m_result'>directory</set>
           </else>
       </if>
       <println><m_path/> is a <m_result/></println>
   </body>

</xsql-script>

c:\tmp is a directory.