- ~IFileIOStream
public:
virtual ~IFileIOStream()
- Destructor
If the stream is still open, the destructor attempts to close it.
However, it does not throw an exception if the close fails.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- IFileIOStream
- Constructs a stream from an IFile object.
Overload 1
public:
IFileIOStream( const IFile& fileToOpen,
int modeForMe = ios::in + ios::out,
int modeForOthers = 0 )
- fileToOpen
- The file to be opened for streaming.
- modeForMe
- The mode in which the file should be opened.
Values for this parameter are formed by ORing together
constants from the ios::open_mode enum. The following
values are useful:
- ios::in - Opens the file for reading.
- ios::out - Opens the file for writing.
- ios::app - Append mode - seeks to end before all writes.
- ios::ate - At end - seeks to the end just after opening.
- ios::binary - Performs i/o in binary mode rather than text.
- ios::trunc - Truncates an existing file to 0 length when
opening.
- modeForOthers
-
Specifies the modes in which you want to allow others to open
the file concurrently with you. This is formed by ORing
values from ios::open_mode. Only the following are useful:
- 0 - Others are not allowed to read or write.
- ios::in - Others may read the file.
- ios::out - Others may write to the file.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Overload 2
public:
IFileIOStream( const IHostPathName& path,
int modeForMe = ios::in + ios::out,
int modeForOthers = 0,
const ICompoundNameParser& = IFile::defaultParser ( ) )
- path
- A host-specific path name to the file which should be opened.
- parser
- The path name parser which should be used to parse the
host-specific path. If none is specified, the default parser
for the current system is used.
- modeForMe
- The mode in which the file should be opened.
Values for this parameter are formed by ORing together
constants from the ios::open_mode enum. The following
values are useful:
- ios::in - Opens the file for reading.
- ios::out - Opens the file for writing.
- ios::app - Append mode - seeks to end before all writes.
- ios::ate - At end - seeks to the end just after opening.
- ios::binary - Performs i/o in binary mode rather than text.
- ios::trunc - Truncates an existing file to 0 length when
opening.
- modeForOthers
-
Specifies the modes in which you want to allow others to open
the file concurrently with you. This is formed by ORing
values from ios::open_mode. Only the following are useful:
- 0 - Others are not allowed to read or write.
- ios::in - Others may read the file.
- ios::out - Others may write to the file.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |