Class to provide open/close access as "handle" (int) for 3rd-party libraries. More...
#include <mi32/filelegacy.h>
Public Member Functions | |
| FILE_LEGACY_HANDLE () | |
| ~FILE_LEGACY_HANDLE () | |
| void | Close () |
| int | GetHandle () const |
| bool | IsOpen () const |
| ERRVALUE | Open (const FILEPATH &filepath, FILE_ACCESS access=FILE_ACCESS_Read, FILE_SHARE share=FILE_SHARE_Auto) |
| operator int () const | |
Class to provide open/close access as "handle" (int) for 3rd-party libraries.
Provides implicit cast to int handle.
| FILE_LEGACY_HANDLE::FILE_LEGACY_HANDLE | ( | ) |
Default constructor.
| FILE_LEGACY_HANDLE::~FILE_LEGACY_HANDLE | ( | ) |
Destructor, closes file if open.
| void FILE_LEGACY_HANDLE::Close | ( | ) |
Close file if open.
| int FILE_LEGACY_HANDLE::GetHandle | ( | ) | const [inline] |
Get legacy handle.
| bool FILE_LEGACY_HANDLE::IsOpen | ( | ) | const [inline] |
Determine if file is currently open.
| ERRVALUE FILE_LEGACY_HANDLE::Open | ( | const FILEPATH & | filepath, | |
| FILE_ACCESS | access = FILE_ACCESS_Read, |
|||
| FILE_SHARE | share = FILE_SHARE_Auto | |||
| ) |
Open or create specified file.
If file is already open the previous file will be closed. Note that sharing modes are not supported on all platforms and filesystems. If specified sharing mode is not supported then will open with SHARE_Any.
| filepath | Path to file to be opened or created | |
| access | Desired access | |
| share | Sharing mode |
| FILE_LEGACY_HANDLE::operator int | ( | ) | const [inline] |
Cast to legacy "handle".
1.6.1