From WikiChip
Difference between revisions of "mirc/identifiers/$fopen"
(Created page with "{{mirc title|$fopen Identifier}}'''$fopen''' returns information about an open file in file handling == Synopsis == <pre>$fopen(N/name)</pre> == Parameters == * '''N''' - T...") |
(→Properties) |
||
Line 14: | Line 14: | ||
* '''.eof''' - returns 1 if the end of the file was reached, 0 otherwise | * '''.eof''' - returns 1 if the end of the file was reached, 0 otherwise | ||
* '''.err''' - returns 0 if an error occured from the last file access | * '''.err''' - returns 0 if an error occured from the last file access | ||
+ | * '''.bom''' - returns the encoding of the file, "utf16le", "utf16be", "utf8", or "ascii" | ||
== Example == | == Example == |
Latest revision as of 01:38, 17 August 2022
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$fopen returns information about an open file in file handling
Synopsis[edit]
$fopen(N/name)
Parameters[edit]
- N - The Nth handle to be used
- name - The handle name to be used
Properties[edit]
- .fname - returns the complete filename opened
- .pos - returns the position of the pointer in the file
- .eof - returns 1 if the end of the file was reached, 0 otherwise
- .err - returns 0 if an error occured from the last file access
- .bom - returns the encoding of the file, "utf16le", "utf16be", "utf8", or "ascii"
Example[edit]
//fopen test $qt($mircini) | echo -a > $fread(test) $fopen(test).pos | fclose test
Compatibility[edit]
Added: mIRC v6.1
Added on: 29 Aug 2003
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.