Close the inputstream associated to the file with the id which is passed as attribute and set free all the system resources.

1 file.in.close

<file.in.close>
    <id /> !
</file.in.close>
Example

In the example, A file with a text and its associated stream are created and the information contained in the file is read through the stream. Then the stream is closed. You can see that at the end there is a commented line. Here you try to read the stream again once closed, if you execute it with the line without comment, you can see how there is an error because it would try to read the stream already closed.

Copy
<xsql-script name='file_close_sample1'>
    <body>
        <set name='my_file'>
            <string>my_file.txt</string>
        </set>
	<file.bytes.write>
            <file name='#my_file'/>
            <string.getBytes>file's text</string.getBytes>
        </file.bytes.write>
        
        <set name = 'm_file'>
	    <file name='my_file.txt'/>
	</set>
        <set name = 'is1'>
	    <file.in.open id='in1'>
	        <m_file/>
	    </file.in.open>
	</set>
        
        <println><file.in.readAll id='in1' /></println>
            
	<file.in.close id='in1'>
	</file.in.close>
		
	<!--
	<println><file.in.readAll id='in1' /></println>
	-->
    </body>
</xsql-script>