FileHandle :: Open - Open file handle
The file handle is opened at the location cpath in the given access mode and as binary file, always.. If the file is opened in write mode ( accopt PI_Write ), existing file will be overwritten. If the file path passed in cpath does not exist, open will fail.
// C++
file_handle.Open("myFile.txt",PI_Write);
// OSI
file_handle.Open("myFile.txt","PI_Write");
file_handle.Open("myFile.txt",PIACC::PI_Write);
Notes:
The access mode has to be passed as enumerator value in C++. In OSI, the value might be passed as scoped enumerator value or as string containing the enumerator name.
Return value: Success ( logical )
Implementation details
logical
FileHandle  :: Open ( NPath &cpath, PIACC accopt )
- cpath - Complete file or directory path
- accopt - Access mode