More changes to support X-FLAIM.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@376 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -65,11 +65,14 @@ public:
|
||||
|
||||
F_FileSystem()
|
||||
{
|
||||
m_bCanDoAsync = FALSE;
|
||||
}
|
||||
|
||||
virtual ~F_FileSystem()
|
||||
{
|
||||
}
|
||||
|
||||
RCODE setup( void);
|
||||
|
||||
RCODE FLMAPI createFile(
|
||||
const char * pszFileName,
|
||||
@@ -185,6 +188,8 @@ public:
|
||||
const char * pszFileName,
|
||||
FLMBOOL bReadOnly);
|
||||
|
||||
FLMBOOL FLMAPI canDoAsync( void);
|
||||
|
||||
private:
|
||||
|
||||
RCODE removeEmptyDir(
|
||||
@@ -199,6 +204,8 @@ private:
|
||||
const char * tpath,
|
||||
FLMBOOL * isdir);
|
||||
#endif
|
||||
|
||||
FLMBOOL m_bCanDoAsync;
|
||||
};
|
||||
|
||||
FSTATIC FLMBOOL f_canReducePath(
|
||||
@@ -417,6 +424,35 @@ RCODE f_allocFileHdl(
|
||||
|
||||
return( NE_FLM_OK);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Desc:
|
||||
****************************************************************************/
|
||||
RCODE F_FileSystem::setup( void)
|
||||
{
|
||||
#if defined( FLM_WIN)
|
||||
OSVERSIONINFO versionInfo;
|
||||
|
||||
versionInfo.dwOSVersionInfoSize = sizeof( OSVERSIONINFO);
|
||||
if( !GetVersionEx( &versionInfo))
|
||||
{
|
||||
return( f_mapPlatformError( GetLastError(), NE_FLM_FAILURE));
|
||||
}
|
||||
|
||||
// Async writes are not supported on Win32s (3.1) or
|
||||
// Win95, 98, ME, etc.
|
||||
|
||||
m_bCanDoAsync =
|
||||
(versionInfo.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS &&
|
||||
versionInfo.dwPlatformId != VER_PLATFORM_WIN32s)
|
||||
? TRUE
|
||||
: FALSE;
|
||||
#else
|
||||
m_bCanDoAsync = TRUE;
|
||||
#endif
|
||||
|
||||
return( NE_FLM_OK);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Desc: Create a file, return a file handle to created file.
|
||||
@@ -1451,6 +1487,14 @@ Exit:
|
||||
return( rc);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Desc: stat tpath to see if it is a directory
|
||||
****************************************************************************/
|
||||
FLMBOOL FLMAPI F_FileSystem::canDoAsync( void)
|
||||
{
|
||||
return( m_bCanDoAsync);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Desc: stat tpath to see if it is a directory
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user