Parameters |
Description |
const OdString& filename |
[in] Filename. |
Oda::FileAccessMode accessMode = Oda::kFileRead |
[in] Access mode. |
Oda::FileShareMode shareMode = Oda::kShareDenyNo |
[in] Share mode. |
Oda::FileCreationDisposition creationDisposition = Oda::kOpenExisting |
[in] Creation disposition. |
Returns a SmartPointer to an OdStreamBuf object for the file.
Creates and/or opens the specified file.
accessMode must be a combination of one or more of the following:
Name |
Value |
Description |
Oda::kFileRead |
0x80000000 |
Read access. |
Oda::kFileWrite |
0x40000000 |
Write access. |
shareMode must be one of the following:
Name |
Value |
Description |
Oda::kShareDenyReadWrite |
0x10 |
deny read/write mode |
Oda::kShareDenyWrite |
0x20 |
deny write mode |
Oda::kShareDenyRead |
0x30 |
deny read mode |
Oda::kShareDenyNo |
0x40 |
deny none mode |
Creation disposition must be one of the following:
Name |
Value |
Description |
Oda::kCreateNew |
1 |
Creates a new file; fails if the specified file already exists. |
Oda::kCreateAlways |
2 |
Creates a new file; overwrites any existing file. |
Oda::kOpenExisting |
3 |
Opens the file; fails if the file does not exist. |
Oda::kOpenAlways |
4 |
Opens the file; creates the file if it does not exist. |
Oda::kTruncateExisting |
5 |
Truncates the file; fails if the file does not exist. The file must be open at least Oda::kFileWrite. |
Copyright © 2002–2020. Open Design Alliance. All rights reserved.
|