add stubs
This commit is contained in:
@@ -27,9 +27,7 @@ RageFileManager::RageFileManager()
|
|||||||
{
|
{
|
||||||
/* Add file search paths, higher priority first. */
|
/* Add file search paths, higher priority first. */
|
||||||
#if defined(XBOX)
|
#if defined(XBOX)
|
||||||
RageFileManager::Mount( "dir", ".", "" );
|
RageFileManager::Mount( "dir", SYS_BASE_PATH, "" );
|
||||||
/* XXX: drop BASE_PATH and do this instead */
|
|
||||||
// RageFileManager::Mount( "dir", "D:\\", "" );
|
|
||||||
#elif defined(LINUX)
|
#elif defined(LINUX)
|
||||||
/* We can almost do this, to have machine profiles be system-global to eg. share
|
/* We can almost do this, to have machine profiles be system-global to eg. share
|
||||||
* scores. It would need to handle permissions properly. */
|
* scores. It would need to handle permissions properly. */
|
||||||
@@ -83,6 +81,8 @@ RageFileManager::~RageFileManager()
|
|||||||
|
|
||||||
CString LoadedDriver::GetPath( CString path )
|
CString LoadedDriver::GetPath( CString path )
|
||||||
{
|
{
|
||||||
|
path.Replace( "\\", "/" );
|
||||||
|
|
||||||
/* If the path begins with @, default mount points don't count. */
|
/* If the path begins with @, default mount points don't count. */
|
||||||
const bool Dedicated = ( path.size() && path[0] == '@' );
|
const bool Dedicated = ( path.size() && path[0] == '@' );
|
||||||
if( MountPoint.size() == 0 )
|
if( MountPoint.size() == 0 )
|
||||||
@@ -167,6 +167,17 @@ bool RageFileManager::MountpointIsReady( CString MountPoint )
|
|||||||
return false;
|
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 )
|
RageFileManager::FileType RageFileManager::GetFileType( const CString &sPath )
|
||||||
{
|
{
|
||||||
for( unsigned i = 0; i < g_Drivers.size(); ++i )
|
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::IsADirectory( const CString &sPath ) { return GetFileType(sPath) == TYPE_DIR; }
|
||||||
bool RageFileManager::DoesFileExist( const CString &sPath ) { return GetFileType(sPath) != TYPE_NONE; }
|
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( "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ public:
|
|||||||
bool IsMounted( CString MountPoint );
|
bool IsMounted( CString MountPoint );
|
||||||
bool MountpointIsReady( CString MountPoint );
|
bool MountpointIsReady( CString MountPoint );
|
||||||
|
|
||||||
|
void FlushDirCache( const CString &sPath );
|
||||||
|
|
||||||
/* Used only by RageFile: */
|
/* Used only by RageFile: */
|
||||||
RageFileObj *Open( const CString &sPath, RageFile::OpenMode mode, RageFile &p, int &err );
|
RageFileObj *Open( const CString &sPath, RageFile::OpenMode mode, RageFile &p, int &err );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user