RageFileManager::Remount

This commit is contained in:
Glenn Maynard
2005-01-27 03:43:55 +00:00
parent 6e644f3d77
commit 67d5bfd6d5
5 changed files with 39 additions and 7 deletions
+14 -7
View File
@@ -54,14 +54,9 @@ public:
RageFileDriverDirect::RageFileDriverDirect( CString root_ ):
RageFileDriver( new DirectFilenameDB(root_) ),
root(root_)
RageFileDriver( new DirectFilenameDB(root_) )
{
if( root.Right(1) != "/" )
root += '/';
/* If the root path doesn't exist, create it. */
CreateDirectories( root );
Remount( root_ );
}
@@ -176,6 +171,18 @@ bool RageFileDriverDirect::Ready()
return PathReady( root );
}
bool RageFileDriverDirect::Remount( const CString &sPath )
{
root = sPath;
if( root.Right(1) != "/" )
root += '/';
/* If the root path doesn't exist, create it. */
CreateDirectories( root );
return true;
}
static const unsigned int BUFSIZE = 1024*64;
RageFileObjDirect::RageFileObjDirect( const CString &path_, int fd_, int mode_ )
{