Open Files 5.3.0
Multi-Platform Event-Driven Application Framework
Open Files File APIs

The Open Files File Facility provides Generic File Handling APIs to applications.

Open File also provides a dispatch to platform specific File System and File System specific APIs. Lastly, the Open File Module provides abstractions for device mapping and URL specifications.

Open File APIs are modeled after the Windows file APIs. The advantages of the Windows file API are:

Since the Open File file APIs are modeled after the Windows APIs, the definitive documentation for them is derived from the Windows API documentation. The naming convention used by Open Files is that all typedefs that are capitalized in the Windows API (eg. WIN32_FIND_DATAW) are provided in open files with a "OFC_" prefix, as in OFC_WIN32_FIND_DATAW. All function calls in the Windows API (eg. CreateFile) are provided in Open Files with a "Ofc" prefix, as in OfcCreateFile. Unless specifically noted, the functionality of the open files routines are equivalent to the functionality in the Win32 APIs. For the most part, a Windows file application can be ported to an open files application by applying these two translation rules.

The definitive Windows documentation for the file apis can be found at [https://docs.microsoft.com/en-us/windows/win32/api/fileapi/].

The Open Files Files Related APIs consist of the following functions:

Function Description
OfcCreateFileW Open or Create a File and Return Handle (Wide)
OfcCreateFileA Open or Create a File and Return Handle (Normal)
OfcCreateFile Open or Create a File and Return Handle (Default)
OfcCloseHandle Close a File Handle
OfcCreateDirectoryW Create a Directory (Wide)
OfcCreateDirectoryA Create a Directory (Normal)
OfcCreateDirectory Create a Directory (Deault)
OfcDeleteFileW Delete a File (Wide)
OfcDeleteFileA Delete a File (Normal)
OfcDeleteFile Delete a File (Default)
OfcRemoveDirectoryW Delete a Directory (Wide)
OfcRemoveDirectoryA Delete a Directory (Normal)
OfcRemoveDirectory Delete a Directory (Default)
OfcFindFirstFileW Open a Search for File (Wide)
OfcFindFirstFileA Open a Search for File (Normal)
OfcFindFirstFile Open a Search for File (Default)
OfcFindNextFileW Return Next File (Wide)
OfcFindNextFileA Return Next File (Normal)
OfcFindNextFile Return Next File (Default)
OfcFindClose Closes a file search
OfcFlushFileBuffers Flush a File
OfcGetFileAttributesExW Get File Attributes by Name (Wide)
OfcGetFileAttributesExA Get File Attributes by Name (Normal)
OfcGetFileAttributesEx Get File Attributes by Name (Default)
OfcGetFileInformationByHandleEx Get File Attributes by Handle
OfcMoveFileW Move File (Wide)
OfcMoveFileA Move File (Normal)
OfcMoveFile Move File (Default)
OfcReadFile Read from a File
OfcCreateOverlapped Create an overlapped buffer handle
OfcDestroyOverlapped Destroy an overlapped buffer handle
OfcSetOverlappedOffset Set file offset in buffer handle
OfcGetOverlappedResult Get the result of a overlapped buffer
OfcSetEndOfFile Set End of File
OfcSetFileAttributesW Set File Attributes (Wide)
OfcSetFileAttributesA Set File Attributes (Normal)
OfcSetFileAttributes Set File Attributes (Default)
OfcSetFileInformationByHandle Set File Attributes by Handle
OfcSetFilePointer Set File Pointer
OfcWriteFile Write File Buffer
OfcTransactNamedPipe Perform Named Pipe Transaction
OfcGetLastFileError Get Last File Error on Handle
OfcGetLastError Get Last Error on Process
OfcGetLastFileNameErrorW Get Last File Error on Name (Wide)
OfcGetLastFileNameErrorA Get Last File Error on Name (Normal)
OfcGetLastFileNameError Get Last File Error on Name (Default)
ofc_get_error_string Translate error code to string
OfcGetDiskFreeSpaceW Get Disk Free Space (Wide)
OfcGetDiskFreeSpaceA Get Disk Free Space (Normal)
OfcGetDiskFreeSpace Get Disk Free Space (Default)
OfcGetVolumeInformationW Get Volume Information (Wide)
OfcGetVolumeInformationA Get Volume Information (Normal)
OfcGetVolumeInformation Get Volume Information (Normal)
OfcUnlockFileEx Unlock a file
OfcLockFileEx Lock a file
OfcFileGetOverlappedEvent Get Event for Overlapped Handle
OfcFileGetOverlappedWaitQ Get WaitQ of Overlapped Handle
OfcDismountW Dismount a share (Wide)
OfcDismountA Dismount a share (Normal)
OfcDismount Dismount a share (Default)
OfcDeviceIoControl Issue ioctl