Project

General

Profile

$fopen » History » Revision 2

Revision 1 (Per Amundsen, 08/11/2015 06:15 AM) → Revision 2/8 (Per Amundsen, 12/14/2016 11:54 PM)

_Added in 1.9.0_ 

 *$fopen(name|N)* 

 Returns information about an open file. 

 *Parameters* 

 name|N - Name of an open file, If N = 0 number of open files, otherwise the Nth open file. 

 *Properties* 

 .fname - Returns the name associated with the file. 
 .pos - Returns the current position in the file. 
 .eof - Returns [[$true]] if the position is as the end of the file, otherwise [[$false]]. 
 .err - TODO 

 *Example* 

 <pre> 
 ; Open a file. 
 /fopen Example Example.txt 

 ; Print number of open files. files 
 //echo -ag $fopen(0) 

 ; Print information about the 'Example' file. 
 //echo -ag $fopen(Example) position is $fopen(Example).pos 

 ; Close the file. file 
 /fclose Example 
 </pre>