00001
00002
00003
#ifndef RAGE_FILE_DRIVER_DIRECT_HELPERS_H
00004
#define RAGE_FILE_DRIVER_DIRECT_HELPERS_H
00005
00006
#include <fcntl.h>
00007
00008
#if defined(_XBOX)
00009
int DoMkdir(
const CString &sPath,
int perm );
00010
int DoOpen(
const CString &sPath,
int flags,
int perm );
00011
int DoStat(
const CString &sPath,
struct stat *st );
00012
int DoRemove(
const CString &sPath );
00013
int DoRmdir(
const CString &sPath );
00014 HANDLE
DoFindFirstFile(
const CString &sPath, WIN32_FIND_DATA *fd );
00015
#else
00016 #define DoOpen open
00017 #define DoStat stat
00018 #define DoMkdir mkdir
00019 #define DoFindFirstFile FindFirstFile
00020 #define DoRemove remove
00021 #define DoRmdir rmdir
00022
#endif
00023
00024
#if defined(WIN32)
00025
int WinMoveFile( CString sOldPath, CString sNewPath );
00026
#endif
00027
00028
#if !defined(O_BINARY)
00029 #define O_BINARY 0
00030
#endif
00031
00032
bool CreateDirectories( CString Path );
00033
bool PathReady( CString path );
00034
00035
#include "RageUtil_FileDB.h"
00036 class DirectFilenameDB:
public FilenameDB
00037 {
00038
public:
00039
DirectFilenameDB(
CString root );
00040
void SetRoot(
CString root );
00041
00042
protected:
00043
virtual void PopulateFileSet(
FileSet &fs,
const CString &sPath );
00044 CString root;
00045 };
00046
00047
#endif
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072