add stubs

This commit is contained in:
Glenn Maynard
2003-12-07 04:21:04 +00:00
parent c6b550e2ef
commit e25549cfe1
2 changed files with 51 additions and 3 deletions
+49 -3
View File
@@ -27,9 +27,7 @@ RageFileManager::RageFileManager()
{
/* Add file search paths, higher priority first. */
#if defined(XBOX)
RageFileManager::Mount( "dir", ".", "" );
/* XXX: drop BASE_PATH and do this instead */
// RageFileManager::Mount( "dir", "D:\\", "" );
RageFileManager::Mount( "dir", SYS_BASE_PATH, "" );
#elif defined(LINUX)
/* We can almost do this, to have machine profiles be system-global to eg. share
* scores. It would need to handle permissions properly. */
@@ -83,6 +81,8 @@ RageFileManager::~RageFileManager()
CString LoadedDriver::GetPath( CString path )
{
path.Replace( "\\", "/" );
/* If the path begins with @, default mount points don't count. */
const bool Dedicated = ( path.size() && path[0] == '@' );
if( MountPoint.size() == 0 )
@@ -167,6 +167,17 @@ bool RageFileManager::MountpointIsReady( CString MountPoint )
return false;
}
void RageFileManager::FlushDirCache( const CString &sPath )
{
for( unsigned i = 0; i < g_Drivers.size(); ++i )
{
const CString path = g_Drivers[i].GetPath( sPath );
if( path.size() == 0 )
continue;
g_Drivers[i].driver->FlushDirCache( path );
}
}
RageFileManager::FileType RageFileManager::GetFileType( const CString &sPath )
{
for( unsigned i = 0; i < g_Drivers.size(); ++i )
@@ -314,3 +325,38 @@ bool RageFileManager::IsAFile( const CString &sPath ) { return GetFileType(sPath
bool RageFileManager::IsADirectory( const CString &sPath ) { return GetFileType(sPath) == TYPE_DIR; }
bool RageFileManager::DoesFileExist( const CString &sPath ) { return GetFileType(sPath) != TYPE_NONE; }
bool DoesFileExist( const CString &sPath )
{
return FILEMAN->DoesFileExist( sPath );
}
bool IsAFile( const CString &sPath )
{
return FILEMAN->IsAFile( sPath );
}
bool IsADirectory( const CString &sPath )
{
return FILEMAN->IsADirectory( sPath );
}
unsigned GetFileSizeInBytes( const CString &sPath )
{
return FILEMAN->GetFileSizeInBytes( sPath );
}
int GetFileModTime( const CString &sPath )
{
return FILEMAN->GetFileModTime( sPath );
}
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo )
{
FILEMAN->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo );
}
void FlushDirCache()
{
FILEMAN->FlushDirCache( "" );
}
+2
View File
@@ -26,6 +26,8 @@ public:
bool IsMounted( CString MountPoint );
bool MountpointIsReady( CString MountPoint );
void FlushDirCache( const CString &sPath );
/* Used only by RageFile: */
RageFileObj *Open( const CString &sPath, RageFile::OpenMode mode, RageFile &p, int &err );