documentation
download

EarthWalk
Software


EarthWalk
Software
is hosted by

SourceForge Logo


visit

Open Source Developers Network Logo

Version 1.0, May 16, 2002.

EWS::fileIO provides object-oriented input/output to locally mounted disk files. EWS::fileIO is a class wrapper around the 'class-less' perl file i/o functions. The class supports a single file which can be automatically opened with new when the class is instantiated (created), or can be opened with the open method. All class methods apply to the file handle created with the open method.

EWS::fileIO provides the following class methods and attributes:

Class Methods
Public Methods Description
new Returns a blessed reference to a new fileIO object.
close Close the file object.
eof Return the file object end-of-file state.
flock Lock file object (only if opened output).
load Load the contents of the file into an array and return the result.
open Open file.
read Return the number of bytes requested from the current file.
readln Return the next line in the file after removing line-end characters.
seek Reposition file to specified position.
stat Return a hash containing the fields returned by the 'stat' command on the file object.
tell Return the current seek pointer for the file.
truncate Truncate the file to the specified length.
write Write the specified number of bytes to the file.
writeln Write a buffer to the file followed by a new-line sequence.

Class Attributes
Public Attributes Description
debug Set/get the current debug setting.
Revision Returns the revision number.
umask Set/get file creation mode mask.
Version Returns the version number of cookies.pm.
EarthWalk Software. Copyright © 2002.