static MRESULT APIENTRY OK ( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) { /*************************************************************************** * Find the instance data. * ***************************************************************************/ PPROFILE_PARMS Parms = PPROFILE_PARMS ( WinQueryWindowPtr ( hwnd, QWL_USER ) ) ; /*************************************************************************** * Verify the entered path. * ***************************************************************************/ BYTE Name [256] ; WinQueryDlgItemText ( hwnd, Parms->id+ENTRY, sizeof(Name), Name ) ; BYTE FullPath [256] ; if ( DosQueryPathInfo ( Name, FIL_QUERYFULLNAME, FullPath, sizeof(FullPath) ) ) { PSZ Message = PSZ ( "ERROR: Not a valid path." ) ; WinSetDlgItemText ( hwnd, Parms->id+ERR, Message ) ; WinAlarm ( HWND_DESKTOP, WA_ERROR ) ; WinSetFocus ( HWND_DESKTOP, WinWindowFromID ( hwnd, Parms->id+ENTRY ) ) ; return ( 0 ) ; } FILESTATUS3 Status ; if ( DosQueryPathInfo ( FullPath, FIL_STANDARD, &Status, sizeof(Status) ) ) { PSZ Message = PSZ ( "ERROR: Path does not exist." ) ; WinSetDlgItemText ( hwnd, Parms->id+ERR, Message ) ; WinAlarm ( HWND_DESKTOP, WA_ERROR ) ; WinSetFocus ( HWND_DESKTOP, WinWindowFromID ( hwnd, Parms->id+ENTRY ) ) ; return ( 0 ) ; } if ( ! ( Status.attrFile & FILE_DIRECTORY ) ) { PSZ Message = PSZ ( "ERROR: Specified path is not a directory." ) ; WinSetDlgItemText ( hwnd, Parms->id+ERR, Message ) ; WinAlarm ( HWND_DESKTOP, WA_ERROR ) ; WinSetFocus ( HWND_DESKTOP, WinWindowFromID ( hwnd, Parms->id+ENTRY ) ) ; return ( 0 ) ; } /*************************************************************************** * Return the full path to the caller. * ***************************************************************************/ strncpy ( PCHAR(Parms->Path), PCHAR(FullPath), Parms->PathSize ) ; /*************************************************************************** * Dismiss the dialog with a TRUE status. * ***************************************************************************/ WinDismissDlg ( hwnd, TRUE ) ; return ( 0 ) ; }
APIRET InitializeXPIStub() { char szBuf[MAX_BUF]; char szXPIStubFile[MAX_BUF]; hXPIStubInst = NULL; /* get full path to xpistub.dll */ if(DosQueryPathInfo("xpistub.dll", sizeof(szXPIStubFile), szXPIStubFile, NULL) == FALSE) PrintError("File not found: xpistub.dll", ERROR_CODE_SHOW, 2); /* load xpistub.dll */ if((DosLoadModule(&szBuf, sizeof(szBuf), szXPIStubFile, &hXPIStubInst)) != NO_ERROR) { sprintf(szBuf, "Error loading library: %s\n", szXPIStubFile); PrintError(szBuf, ERROR_CODE_SHOW, 1); } if((pfnXpiInit = DosQueryProcAddr(hXPIStubInst, 1L, NULL,"XPI_Init")) == NULL) { sprintf(szBuf, "DosQueryProcAddr() failed: XPI_Init\n"); PrintError(szBuf, ERROR_CODE_SHOW, 1); } if((pfnXpiInstall = DosQueryProcAddr(hXPIStubInst, 1L, NULL,"XPI_Install")) == NULL) { sprintf(szBuf, "DosQueryProcAddr() failed: XPI_Install\n"); PrintError(szBuf, ERROR_CODE_SHOW, 1); } if((pfnXpiExit = DosQueryProcAddr(hXPIStubInst, 1L, NULL,"XPI_Exit")) == NULL) { sprintf(szBuf, "DosQueryProcAddr() failed: XPI_Exit\n"); PrintError(szBuf, ERROR_CODE_SHOW, 1); } return(0); }
_WCRTLINK int __F_NAME(access,_waccess)( const CHAR_TYPE *path, int pmode ) { APIRET rc; OS_UINT attr; #ifndef _M_I86 FILESTATUS3 fs; #endif #ifdef __WIDECHAR__ char mbPath[MB_CUR_MAX * _MAX_PATH]; /* single-byte char */ if( wcstombs( mbPath, path, sizeof( mbPath ) ) == -1 ) { mbPath[0] = '\0'; } #endif #ifdef _M_I86 rc = DosQFileMode( (PSZ)__F_NAME(path,mbPath), &attr, 0 ); #else rc = DosQueryPathInfo( (PSZ)__F_NAME(path,mbPath), FIL_STANDARD, &fs, sizeof( fs ) ); attr = fs.attrFile; #endif if( rc ) { return( __set_errno_dos( rc ) ); } if( (pmode & ACCESS_WR) && (attr & _A_RDONLY) ) { return( __set_errno_dos( ERROR_ACCESS_DENIED ) ); /* invalid access mode */ } return( 0 ); }
PRInt32 _PR_MD_GETFILEINFO64(const char *fn, PRFileInfo64 *info) { PRFileInfo info32; PRInt32 rv = _PR_MD_GETFILEINFO(fn, &info32); if (rv != 0) { return rv; } info->type = info32.type; LL_UI2L(info->size,info32.size); info->modifyTime = info32.modifyTime; info->creationTime = info32.creationTime; if (isWSEB) { APIRET rc ; FILESTATUS3L fstatus; rc = DosQueryPathInfo(fn, FIL_STANDARDL, &fstatus, sizeof(fstatus)); if (NO_ERROR != rc) { _PR_MD_MAP_OPEN_ERROR(rc); return -1; } if (! (fstatus.attrFile & FILE_DIRECTORY)) { info->size = fstatus.cbFile; } } return rv; }
BOOL CopyFile(char szSourceSpec[],char szDestSpec[]) { FILESTATUS3 stFileStatus; APIRET rc; if ((rc = DosCopy(szSourceSpec,szDestSpec,DCPY_EXISTING)) != NO_ERROR) { if (rc == ERROR_ACCESS_DENIED) { if (DosQueryPathInfo(szDestSpec,1,&stFileStatus,sizeof(FILESTATUS3)) == NO_ERROR) { if (stFileStatus.attrFile & FILE_HIDDEN) { stFileStatus.attrFile &= ~FILE_HIDDEN; DosSetPathInfo(szDestSpec,1,&stFileStatus,sizeof(FILESTATUS3),0); if ((rc = DosCopy(szSourceSpec,szDestSpec,DCPY_EXISTING)) != NO_ERROR) return(FALSE); } } else return(FALSE); } else return(FALSE); } ClearReadOnly(szDestSpec); return(TRUE); }
unsigned int get_ea_size(char *name) { #if TARGET==OS2 #ifdef __32BIT__ FILESTATUS4 fs; #else FILESTATUS2 fs; #endif unsigned int rc; #ifdef __32BIT__ DosQueryPathInfo(name, FIL_QUERYEASIZE, (PVOID)&fs, sizeof(fs)); #else DosQPathInfo(name, FIL_QUERYEASIZE, (PVOID)&fs, sizeof(fs), 0L); #endif rc=(fs.cbList>=4)?fs.cbList-4:fs.cbList; #ifdef __32BIT__ rc>>=1; /* BUGBUG? */ #endif return(rc); #elif TARGET==WIN32 struct nt_sid *sid; unsigned long rc; if(!ea_supported||(sid=open_streams(name, 0))==NULL) return(0); rc=seek_stream_id(BACKUP_EA_DATA, sid); close_streams(sid); return((rc>0xFFFF)?0:rc); #else return(0); #endif }
//---------------------------- CMD_DosQueryPathInfo ---------------------------- void CMD_DosQueryPathInfo(HFILE hFile,LXIOCPA_DMN_CMDPARMPACKET* pParam ,PLXDOSQUERYPATHINFOSTRUCT pi) { pParam->rc=DosQueryPathInfo(pi->pathName,pi->ulInfoLevel ,&pi->LXDOSQUERYPATHINFOUNION.fileStatus3 ,pi->cbInfoBuf); }
/* ** Check the existance and status of a file. */ static int os2Access( sqlite3_vfs *pVfs, /* Not used on os2 */ const char *zFilename, /* Name of file to check */ int flags, /* Type of test to make on this file */ int *pOut /* Write results here */ ){ FILESTATUS3 fsts3ConfigInfo; APIRET rc = NO_ERROR; char *zFilenameCp = convertUtf8PathToCp( zFilename ); memset( &fsts3ConfigInfo, 0, sizeof(fsts3ConfigInfo) ); rc = DosQueryPathInfo( (PSZ)zFilenameCp, FIL_STANDARD, &fsts3ConfigInfo, sizeof(FILESTATUS3) ); free( zFilenameCp ); OSTRACE4( "ACCESS fsts3ConfigInfo.attrFile=%d flags=%d rc=%d\n", fsts3ConfigInfo.attrFile, flags, rc ); switch( flags ){ case SQLITE_ACCESS_READ: case SQLITE_ACCESS_EXISTS: rc = (rc == NO_ERROR); OSTRACE3( "ACCESS %s access of read and exists rc=%d\n", zFilename, rc ); break; case SQLITE_ACCESS_READWRITE: rc = (rc == NO_ERROR) && ( (fsts3ConfigInfo.attrFile & FILE_READONLY) == 0 ); OSTRACE3( "ACCESS %s access of read/write rc=%d\n", zFilename, rc ); break; default: assert( !"Invalid flags argument" ); } *pOut = rc; return SQLITE_OK; }
int __PHYSFS_platformIsDirectory(const char *fname) { FILESTATUS3 fs; APIRET rc = DosQueryPathInfo(fname, FIL_STANDARD, &fs, sizeof (fs)); BAIL_IF_MACRO(os2err(rc) != NO_ERROR, NULL, 0) return((fs.attrFile & FILE_DIRECTORY) != 0); } /* __PHYSFS_platformIsDirectory */
USHORT CompareFileDate(char szSourceFileSpec[],char szDestFileSpec[]) { FILESTATUS3 stFileInfo; FDATE fdateSourceCreation; char szMessage[200]; char szCaption[40]; APIRET rc; DosQueryPathInfo(szSourceFileSpec,1,&stFileInfo,sizeof(FILESTATUS3)); fdateSourceCreation = stFileInfo.fdateCreation; if ((rc = DosQueryPathInfo(szDestFileSpec,1,&stFileInfo,sizeof(FILESTATUS3))) == NO_ERROR) { if (fdateSourceCreation.year > stFileInfo.fdateCreation.year) return(MBID_YES); else if (fdateSourceCreation.year == stFileInfo.fdateCreation.year) if (fdateSourceCreation.month > stFileInfo.fdateCreation.month) return(MBID_YES); else if (fdateSourceCreation.month == stFileInfo.fdateCreation.month) if (fdateSourceCreation.day >= stFileInfo.fdateCreation.day) return(MBID_YES); sprintf(szMessage,"%s is the same, or newer, version than the file to be installed.\n\nDo you want to replace it?",szDestFileSpec); sprintf(szCaption,"Newer file exists!"); return(WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,szMessage,szCaption, HLPP_MB_OLD_FILE, (MB_MOVEABLE | MB_HELP | MB_YESNOCANCEL | MB_ICONQUESTION))); } else { if (rc == ERROR_SHARING_VIOLATION) { sprintf(szMessage,"%s is currently in open by another process.\n\nPlease correct and reinstall.",szDestFileSpec); sprintf(szCaption,"File Currently in Use!"); WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, szMessage, szCaption, HLPP_MB_FILE_INUSE, (MB_MOVEABLE | MB_OK | MB_HELP)); return(MBID_CANCEL); } } return(MBID_NO); }
/* -------------------------------------------------------------------------- Return the size of a file. - Parameters ------------------------------------------------------------- PSZ pszFile : file name. - Return value ----------------------------------------------------------- LONGLONG : file size or -1 in case of error. -------------------------------------------------------------------------- */ LONGLONG fmFileSize(PSZ pszFile) { FILESTATUS3L fs; g.rc = DosQueryPathInfo(pszFile, FIL_STANDARDL, &fs, sizeof(fs)); if (g.rc == NO_ERROR) return fs.cbFile; handleFileIOError(0, SZERR_FILESIZE2, pszFile, g.rc); return -1LL; }
int Q_FileType (const char *path) { FILESTATUS3 fs; APIRET rc = DosQueryPathInfo(path, FIL_STANDARD, &fs, sizeof(fs)); if (rc != NO_ERROR) return FS_ENT_NONE; if (fs.attrFile & FILE_DIRECTORY) return FS_ENT_DIRECTORY; return FS_ENT_FILE; }
HB_BOOL hb_fsFileExists( const char * pszFileName ) { HB_BOOL fExist = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_fsFileExists(%p)", pszFileName ) ); if( pszFileName != NULL ) { #if defined( HB_OS_WIN ) LPTSTR lpFree; LPCTSTR lpFileName = HB_FSNAMECONV( pszFileName, &lpFree ); DWORD dwAttr; dwAttr = GetFileAttributes( lpFileName ); fExist = ( dwAttr != INVALID_FILE_ATTRIBUTES ) && ( dwAttr & ( FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE ) ) == 0; if( lpFree ) hb_xfree( lpFree ); #else char * pszFree = NULL; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); { # if defined( HB_OS_DOS ) # if defined( __DJGPP__ ) || defined( __BORLANDC__ ) int iAttr = _chmod( pszFileName, 0, 0 ); fExist = iAttr != -1 && ( iAttr & 0x10 ) == 0; # else unsigned int iAttr = 0; fExist = _dos_getfileattr( pszFileName, &iAttr ) == 0 && ( iAttr & 0x10 ) == 0; # endif # elif defined( HB_OS_OS2 ) FILESTATUS3 fs3; fExist = DosQueryPathInfo( ( PCSZ ) pszFileName, FIL_STANDARD, &fs3, sizeof( fs3 ) ) == NO_ERROR && ( fs3.attrFile & FILE_DIRECTORY ) == 0; # elif defined( HB_OS_UNIX ) struct stat statbuf; fExist = stat( pszFileName, &statbuf ) == 0 && S_ISREG( statbuf.st_mode ); # else int iTODO; /* To force warning */ # endif } if( pszFree ) hb_xfree( pszFree ); #endif } return fExist; }
long Q_filesize (const char *path) { FILESTATUS3 fs; APIRET rc = DosQueryPathInfo(path, FIL_STANDARD, &fs, sizeof(fs)); if (rc != NO_ERROR) return -1; if (fs.attrFile & FILE_DIRECTORY) return -1; return (long)fs.cbFile; }
long LocalGetFileAttr( char *name ) /*********************************/ { FILESTATUS3 fileinfo; if( DosQueryPathInfo( name, FIL_STANDARD, &fileinfo, sizeof( fileinfo ) ) ) { return( -1 ); } return( fileinfo.attrFile ); }
void Q_mkdir (const char *path) { FILESTATUS3 fs; APIRET rc = DosCreateDir(path, NULL); if (rc == NO_ERROR) return; if ((DosQueryPathInfo(path, FIL_STANDARD, &fs, sizeof(fs)) == NO_ERROR) && (fs.attrFile & FILE_DIRECTORY)) { return; /* dir exists */ } COM_Error ("Unable to create directory %s", path); }
void ClearReadOnly(char szFileSpec[]) { ULONG ulAttr; if (DosQueryPathInfo(szFileSpec,1,&stFileStatus,sizeof(FILESTATUS3)) == NO_ERROR) if (stFileStatus.attrFile & FILE_READONLY) { stFileStatus.attrFile &= ~FILE_READONLY; DosSetPathInfo(szFileSpec,1,&stFileStatus,sizeof(FILESTATUS3),0); } }
char *__PHYSFS_platformRealPath(const char *path) { char buf[CCHMAXPATH]; char *retval; APIRET rc = DosQueryPathInfo(path, FIL_QUERYFULLNAME, buf, sizeof (buf)); BAIL_IF_MACRO(os2err(rc) != NO_ERROR, NULL, NULL); retval = (char *) malloc(strlen(buf) + 1); BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL); strcpy(retval, buf); return(retval); } /* __PHYSFS_platformRealPath */
/* * Since the EA buffer can take more space in memory than on disk * the OS/2 API provides a method of calculating a buffer size which * will guarantee to fit the EA buffer from a specified file. */ ULONG _Inline queryEASize(PSZ pszFile) { APIRET rc = NO_ERROR; FILESTATUS4 fstat4 = { 0 }; rc = DosQueryPathInfo(pszFile, FIL_QUERYEASIZE, &fstat4, sizeof(fstat4)); if(rc != NO_ERROR) { fstat4.cbList = 0UL; } return fstat4.cbList; }
static APIRET EAQueryData( PSZ pszPathName, PGEA2LIST pGEA2List, ULONG cbBuf, PFEA2LIST pFEA2List ) { EAOP2 eaop2 = { NULL, NULL, 0 }; /* EA 'root' data structure */ eaop2.fpGEA2List = pGEA2List; eaop2.fpFEA2List = pFEA2List; pFEA2List->cbList = cbBuf; /* Inform OS/2 how big our FEA2List is */ return DosQueryPathInfo( pszPathName, FIL_QUERYEASFROMLIST, (PBYTE) &eaop2, sizeof ( eaop2 ) ); }
HB_BOOL hb_fsNameExists( const char * pszFileName ) { HB_BOOL fExist = HB_FALSE; HB_TRACE( HB_TR_DEBUG, ( "hb_fsNameExists(%p)", pszFileName ) ); if( pszFileName != NULL ) { #if defined( HB_OS_WIN ) LPTSTR lpFree; LPCTSTR lpFileName = HB_FSNAMECONV( pszFileName, &lpFree ); fExist = ( GetFileAttributes( lpFileName ) != INVALID_FILE_ATTRIBUTES ); if( lpFree ) hb_xfree( lpFree ); #else char * pszFree = NULL; pszFileName = hb_fsNameConv( pszFileName, &pszFree ); { # if defined( HB_OS_DOS ) # if defined( __DJGPP__ ) || defined( __BORLANDC__ ) fExist = _chmod( pszFileName, 0, 0 ) != -1; # else unsigned int iAttr = 0; fExist = _dos_getfileattr( pszFileName, &iAttr ) == 0; # endif # elif defined( HB_OS_OS2 ) FILESTATUS3 fs3; fExist = DosQueryPathInfo( ( PCSZ ) pszFileName, FIL_STANDARD, &fs3, sizeof( fs3 ) ) == NO_ERROR; # elif defined( HB_OS_UNIX ) # if defined( HB_USE_LARGEFILE64 ) struct stat64 statbuf; fExist = stat64( pszFileName, &statbuf ) == 0; # else struct stat statbuf; fExist = stat( pszFileName, &statbuf ) == 0; # endif # else int iTODO; /* To force warning */ # endif } if( pszFree ) hb_xfree( pszFree ); #endif } return fExist; }
unsigned LocalSetFileAttr( char *name, long attr ) /********************************************/ { FILESTATUS3 fileinfo; if ( DosQueryPathInfo( name, FIL_STANDARD, &fileinfo, sizeof( fileinfo ) ) ) return -1; fileinfo.attrFile = attr; return( StashErrCode( DosSetPathInfo( name, FIL_STANDARD, &fileinfo, sizeof( fileinfo ) , 0), OP_LOCAL ) ); }
LONG XFile::GetPathInfo( const char * path, XFileInfo * info) { FILESTATUS3 buffer; LONG res = DosQueryPathInfo( (PSZ) path, 1, &buffer, sizeof(buffer)); if(res == 0) { char * p = (char*) &info->buffer; p += 4; memcpy( p, &buffer, sizeof(buffer)); } return res; }
_WCRTLINK unsigned _dos_getfileattr( const char *path, unsigned *attribute ) /**************************************************************************/ { FILESTATUS3 fs; APIRET rc; rc = DosQueryPathInfo( (PSZ)path, FIL_STANDARD, &fs, sizeof( fs ) ); if( rc != 0 ) { return( __set_errno_dos_reterr( rc ) ); } *attribute = fs.attrFile; return( 0 ); }
// // Check_Size // // This helper function finds out if the given file exists. If so, it returns the file's size. // It will return -1 if the file does not exist. // static long check_file(const char *name) { // We need to figure out how big the file is. This is the way it's done using OS/2. FILESTATUS3 file_info; // Structure to hold the result. APIRET return_code; // To hold the result of the API function. return_code = DosQueryPathInfo(name, 1, &file_info, sizeof(FILESTATUS3)); if (return_code == ERROR_FILE_NOT_FOUND) return -1; if (return_code != 0) throw "Unexpected error occured when searching for the backing file"; return file_info.cbFile; }
int main(VOID) { UCHAR uchFileName[80] = "C:\\STARTUP.CMD"; /* File to manipulate */ FILESTATUS3 fsts3ConfigInfo = {{0}}; /* Buffer for file information */ ULONG ulBufSize = sizeof(FILESTATUS3); /* Size of above buffer */ APIRET rc = NO_ERROR; /* Return code */ rc = DosQueryPathInfo(uchFileName, /* Path and name of file */ FIL_STANDARD, /* Request standard (Level 1) info */ &fsts3ConfigInfo, /* Buffer for file information */ ulBufSize); /* Size of buffer */ if (rc != NO_ERROR) { printf("DosQueryPathInfo error: return code = %u\n", rc); return 1; } printf("%s --- File size: %u bytes\n",uchFileName, fsts3ConfigInfo.cbFile); printf("Last updated: %d/%d/%d; %d:%2.2d\n", fsts3ConfigInfo.fdateLastWrite.month, /* Month */ fsts3ConfigInfo.fdateLastWrite.day, /* Day */ (fsts3ConfigInfo.fdateLastWrite.year+1980L), /* Years since 1980 */ fsts3ConfigInfo.ftimeLastWrite.hours, /* Hours */ fsts3ConfigInfo.ftimeLastWrite.minutes); /* Minutes */ return NO_ERROR; }
int main(VOID) { UCHAR uchPathName[255] = "C:\\OS2\\SYSTEM"; /* Path of interest */ FILESTATUS3 fsts3ConfigInfo = {{0}}; /* Buffer for path information */ ULONG ulBufSize = sizeof(FILESTATUS3); /* Size of above buffer */ APIRET rc = NO_ERROR; /* Return code */ rc = DosQueryPathInfo(uchPathName, /* Name of path */ FIL_STANDARD, /* Request standard (Level 1) info */ &fsts3ConfigInfo, /* Buffer for information */ ulBufSize); /* Size of buffer */ if (rc != NO_ERROR) { printf("DosQueryPathInfo error: return code = %u\n", rc); return 1; } printf("Information for subdirectory: %s:\n",uchPathName); printf("Last updated: %d/%d/%d; %d:%2.2d\n", fsts3ConfigInfo.fdateLastWrite.month, /* Month */ fsts3ConfigInfo.fdateLastWrite.day, /* Day */ (fsts3ConfigInfo.fdateLastWrite.year+1980L), /* Years since 1980 */ fsts3ConfigInfo.ftimeLastWrite.hours, /* Hours */ fsts3ConfigInfo.ftimeLastWrite.minutes); /* Minutes */ return NO_ERROR; }
//------------------------------ CMD_LXAFS_Rename ------------------------------ void CMD_LXAFS_Rename(HFILE hFile,LXIOCPA_DMN_CMDPARMPACKET* pParam ,PLXTWONAMESTRUCT tn) { char* oldname=tn->name1; char* newname=tn->name2; pParam->rc=DosMove(oldname,newname); if(!pParam->rc) { FILESTATUS4 fs4; pParam->rc=DosQueryPathInfo(newname,FIL_QUERYEASIZE,&fs4,sizeof(FILESTATUS4)); if(!pParam->rc) if(fs4.attrFile&FILE_DIRECTORY) pParam->rc=lxafs_linkinfo_correction(newname,oldname); } }
long LocalGetFileAttr( const char *name ) /***************************************/ { #if 0 FILESTATUS3 fileinfo; if( DosQueryPathInfo( name, FIL_STANDARD, &fileinfo, sizeof( fileinfo ) ) ) { return( -1L ); } return( fileinfo.attrFile ); #else name=name; return 0; #endif }
/* ** Turn a relative pathname into a full pathname. Write the full ** pathname into zFull[]. zFull[] will be at least pVfs->mxPathname ** bytes in size. */ static int os2FullPathname( sqlite3_vfs *pVfs, /* Pointer to vfs object */ const char *zRelative, /* Possibly relative input path */ int nFull, /* Size of output buffer in bytes */ char *zFull /* Output buffer */ ){ char *zRelativeCp = convertUtf8PathToCp( zRelative ); char zFullCp[CCHMAXPATH] = "\0"; char *zFullUTF; APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp, CCHMAXPATH ); free( zRelativeCp ); zFullUTF = convertCpPathToUtf8( zFullCp ); sqlite3_snprintf( nFull, zFull, zFullUTF ); free( zFullUTF ); return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR; }