Files
itgmania212121/stepmania/src/RageFileManager.h
T

49 lines
1.3 KiB
C++
Raw Normal View History

2003-12-04 08:25:59 +00:00
#ifndef RAGE_FILE_MANAGER_H
#define RAGE_FILE_MANAGER_H
#include "RageFile.h"
extern CString InitialWorkingDirectory;
extern CString DirOfExecutable;
2003-12-04 08:25:59 +00:00
class RageFileObj;
class RageFileManager
{
public:
RageFileManager( CString argv0 );
2003-12-04 08:25:59 +00:00
~RageFileManager();
void MountInitialFilesystems();
2003-12-04 08:25:59 +00:00
2003-12-16 07:23:54 +00:00
void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
bool Remove( const CString &sPath );
2003-12-05 02:25:32 +00:00
2003-12-04 08:25:59 +00:00
enum FileType { TYPE_FILE, TYPE_DIR, TYPE_NONE };
FileType GetFileType( const CString &sPath );
bool IsAFile( const CString &sPath );
bool IsADirectory( const CString &sPath );
bool DoesFileExist( const CString &sPath );
int GetFileSizeInBytes( const CString &sPath );
2003-12-10 07:07:42 +00:00
int GetFileHash( const CString &sPath );
2003-12-04 08:25:59 +00:00
2003-12-05 00:07:18 +00:00
void Mount( CString Type, CString RealPath, CString MountPoint );
void Unmount( CString Type, CString Root, CString MountPoint );
2003-12-05 00:07:18 +00:00
bool IsMounted( CString MountPoint );
bool MountpointIsReady( CString MountPoint );
2003-12-04 08:25:59 +00:00
2003-12-07 04:21:04 +00:00
void FlushDirCache( const CString &sPath );
2003-12-04 08:25:59 +00:00
/* Used only by RageFile: */
RageFileObj *Open( const CString &sPath, int mode, RageFile &p, int &err );
2003-12-11 05:32:35 +00:00
void Close( RageFileObj *obj );
2003-12-11 07:13:20 +00:00
RageFileObj *CopyFileObj( const RageFileObj *cpy, RageFile &p );
2003-12-05 02:25:32 +00:00
private:
RageFileObj *OpenForWriting( const CString &sPath, int mode, RageFile &p, int &err );
2003-12-04 08:25:59 +00:00
};
extern RageFileManager *FILEMAN;
#endif