Inheritance diagram for oaFile:
Public Methods | |
oaFile (const oaString &nameIn) | |
virtual | ~oaFile () |
void | open (oaChar modeIn) |
void | close () |
void | flush () |
oaUInt4 | read (void *data, oaUInt4 numBytes) |
oaUInt4 | write (void *data, oaUInt4 numBytes) |
virtual oaBoolean | exists () const |
oaBoolean | isOpen () const |
oaBoolean | isNonEmpty () const |
oaChar | getMode () const |
oaUInt8 | getSize () const |
oaTime | getLastWriteTime () const |
oaTime | getCreateTime () const |
Static Public Methods | |
void | copyFile (const oaString &srcPath, const oaString &dstPath) |
|
This function constructs an oaFile object associated with the given file name, but does not open the file.
|
|
This function destroys this oaFile object, closing the file if the file is open, and releasing all resources associated with the file. |
|
This function closes the file.
|
|
This function copies the source file to the destination file. The source file must be readable, and the destination file must be writable. If the destination file exists, it will be overwritten.
|
|
This function returns a boolean value that indicates if this file exists on disk. Reimplemented from oaFSComponent. |
|
This function flushes any buffered output to disk. |
|
This function returns the creation time of the file on the disk. The format of the time is unit of seconds from Jan, 1, 1970, 0 hour, 0 min, 0 sec.
|
|
This function returns the last modified time of the file of the file on the disk (the last time the file was written).
|
|
This function returns a string containing the current mode used to access this file. |
|
This function returns the size of this file, in bytes.
|
|
This function returns true if this file exists on disk and the size is > 0. This function is provided for efficiency so that the file does not have to be looked up twice. |
|
This function returns true if this file is open. |
|
This function opens this file using the specified access mode.
|
|
This function reads data from the file. The file must be open in a readable mode. The function returns the actual number of bytes read, which may be less than the number of bytes requested. An exception will be thrown if any IO error occurs.
|
|
This function writes the data to the file. The file must be open in a writable mode. An exception will be thrown if any IO error occurs.
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.