The following describes the implementation differences between the OS2Linux library and the real OS/2 File Manager APIs.
These APIs are included in your application by including the following definition in your application source file.
#define INCL_DOSFILEMGR
APIRET APIENTRY DosOpen(PSZ pszFileName, PHFILE pHf, PULONG pulAction, ULONG cbFile, ULONG ulAttribute, ULONG fsOpenFlags, ULONG fsOpenMode, PEAOP2 peaop2);
APIRET APIENTRY DosClose(HFILE hFile);
APIRET APIENTRY DosRead(HFILE hFile, PVOID pBuffer, ULONG cbRead, PULONG pcbActual);
APIRET APIENTRY DosWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite, PULONG pcbActual);
APIRET APIENTRY DosDelete(PSZ pszFile);
APIRET APIENTRY DosForceDelete(PSZ pszFile);
APIRET APIENTRY DosDupHandle(HFILE hFile, PHFILE pHfile);
APIRET APIENTRY DosQueryFHState(HFILE hFile, PULONG pMode);
APIRET APIENTRY DosSetFHState(HFILE hFile, ULONG mode);
APIRET APIENTRY DosQueryHType(HFILE hFile, PULONG pType, PULONG pAttr);
APIRET APIENTRY DosFindFirst(PSZ pszFileSpec, PHDIR phdir, ULONG flAttribute, PVOID pfindbuf, ULONG cbBuf, PULONG pcFileNames, ULONG ulInfoLevel);
APIRET APIENTRY DosFindNext(HDIR hDir, PVOID pfindbuf, ULONG cbfindbuf, PULONG pcFilenames);
APIRET APIENTRY DosFindClose(HDIR hDir);
APIRET APIENTRY DosFSAttach(PSZ pszDevice, PSZ pszFilesystem, PVOID pData, ULONG cbData, ULONG flag);
APIRET APIENTRY DosQueryFSAttach(PSZ pszDeviceName, ULONG ulOrdinal, ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb, PULONG pcbBuffLength);
APIRET APIENTRY DosFSCtl(PVOID pData, ULONG cbData, PULONG pcbData, PVOID pParms, ULONG cbParms, PULONG pcbParms, ULONG function, PSZ pszRoute, HFILE hFile, ULONG method);
APIRET APIENTRY DosSetFileSize(HFILE hFile, ULONG cbSize);
APIRET APIENTRY DosResetBuffer(HFILE hFile);
APIRET APIENTRY DosSetFilePtr(HFILE hFile, LONG ib, ULONG method, PULONG ibActual);
APIRET APIENTRY DosMove(PSZ pszOld, PSZ pszNew);
APIRET APIENTRY DosCopy(PSZ pszOld, PSZ pszNew, ULONG option);
APIRET APIENTRY DosEditName(ULONG metalevel, PSZ pszSource, PSZ pszEdit, PBYTE pszTarget, ULONG cbTarget);
APIRET APIENTRY DosCreateDir(PSZ pszDirName, PEAOP2 peaop2);
APIRET APIENTRY DosDeleteDir(PSZ pszDir);
APIRET APIENTRY DosSetDefaultDisk(ULONG disknum);
APIRET APIENTRY DosQueryCurrentDisk(PULONG pdisknum, PULONG plogical);
APIRET APIENTRY DosSetCurrentDir(PSZ pszDir);
APIRET APIENTRY DosQueryCurrentDir(ULONG disknum, PBYTE pBuf, PULONG pcbBuf);
APIRET APIENTRY DosQueryFSInfo(ULONG disknum, ULONG infolevel, PVOID pBuf, ULONG cbBuf);
APIRET APIENTRY DosSetFSInfo(ULONG disknum, ULONG infolevel, PVOID pBuf, ULONG cbBuf);
APIRET APIENTRY DosQueryVerify(PBOOL32 pBool);
APIRET APIENTRY DosSetVerify(BOOL32 verify);
APIRET APIENTRY DosSetMaxFH(ULONG cFH);
APIRET APIENTRY DosSetRelMaxFH(PLONG pcbReqCount, PULONG pcbCurMaxFH);
APIRET APIENTRY DosQueryFileInfo(HFILE hf, ULONG ulInfoLevel, PVOID pInfo, ULONG cbInfoBuf);
APIRET APIENTRY DosSetFileInfo(HFILE hf, ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf);
APIRET APIENTRY DosQueryPathInfo(PSZ pszPathName, ULONG ulInfoLevel, PVOID pInfo, ULONG cbInfoBuf);
APIRET APIENTRY DosSetPathInfo(PSZ pszPathName, ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf, ULONG flOptions);
APIRET APIENTRY DosShutdown(ULONG ulReserved);
APIRET APIENTRY DosEnumAttribute(ULONG ulRefType, PVOID pvFile, ULONG ulEntry, PVOID pvBuf, ULONG cbBuf, PULONG pulCount, ULONG ulInfoLevel);
APIRET APIENTRY DosSetFileLocks(HFILE hFile, PFILELOCK pflUnlock, PFILELOCK pflLock, ULONG timeout, ULONG flags);
APIRET APIENTRY DosCancelLockRequest(HFILE hFile, PFILELOCK pflLock);
APIRET APIENTRY DosProtectEnumAttribute(ULONG ulRefType, PVOID pvFile, ULONG ulEntry, PVOID pvBuf, ULONG cbBuf, PULONG pulCount, ULONG ulInfoLevel, FHLOCK fhFileHandleLockID );
APIRET APIENTRY DosProtectSetFileLocks(HFILE hFile, PFILELOCK pflUnlock, PFILELOCK pflLock, ULONG timeout, ULONG flags, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectOpen(PSZ pszFileName, PHFILE phf, PULONG pulAction, ULONG cbFile, ULONG ulAttribute, ULONG fsOpenFlags, ULONG fsOpenMode, PEAOP2 peaop2, PFHLOCK pfhFileHandleLockID);
APIRET APIENTRY DosProtectClose(HFILE hFile, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectRead(HFILE hFile, PVOID pBuffer, ULONG cbRead, PULONG pcbActual, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite, PULONG pcbActual, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectQueryFHState(HFILE hFile, PULONG pMode, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectSetFHState(HFILE hFile, ULONG mode, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectSetFileSize(HFILE hFile, ULONG cbSize, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectSetFilePtr(HFILE hFile, LONG ib, ULONG method, PULONG ibActual, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectQueryFileInfo(HFILE hf, ULONG ulInfoLevel, PVOID pInfo, ULONG cbInfoBuf, FHLOCK fhFileHandleLockID);
APIRET APIENTRY DosProtectSetFileInfo(HFILE hf, ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf, FHLOCK fhFileHandleLockID);