NAME
Language::Befunge::lib::FILE - file operations
VERSION
version 5.000
DESCRIPTION
The FILE fingerprint (0x46494C45) allows to do file operations.
FUNCTIONS
new
Create a new FILE instance.
file operations
Those operations act as r upon failure.
- C( $fid )
-
Close filehandle corresponding to
$fid. - D ( $path )
-
Delete file
$path(a 0gnirts). - ($fid, $line, $count) = G ( $fid )
-
Read
$linefrom filehandle corresponding to$fid, and push back the file id, as well as the line read and the$countbytes read. - ($fid, $pos) = L( $fid )
-
Fetch current
$poswithin the file corresponding to filehandle$fid, and push it back on the stack (as well as$fidagain). - $fid = O( $vec, $mode, $path )
-
Open the file
$path(a 0gnirts) with$mode, storing$vecas the i/o buffer. Push back$fidon the stack, the filehandle id. Mode can be one of:0 read
1 write
2 append
3 read/write
4 truncate read/write
5 append read/write
- $fid = P( $fid, $string )
-
Write
$stringto file corresponding to$fid. - $fid = R( $fid, $count )
-
Read
$countbytes from file$fidand put it to i/o buffer. Put back$fidon the stack. - $fid = S( $fid, $mode, $pos )
-
Seek to position
$posin file$fid.$modecan be one of:0 from beginning
1 from current location
2 from end
- $fid = W( $fid, $count )
-
Write
$countbytes from buffer to file$fid. Put back$fidon the stack.
SEE ALSO
http://www.rcfunge98.com/rcsfingers.html#FILE.
AUTHOR
Jerome Quelin
COPYRIGHT AND LICENSE
This software is copyright (c) 2003 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.