1
0
Fork 0

Added Class to deactivate cache, for debugging purposes.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@644
This commit is contained in:
Ulf Wohlers 2003-01-19 17:55:05 +00:00
parent 75072258ec
commit b9434bbf8b
3 changed files with 80 additions and 21 deletions

View file

@ -39,7 +39,7 @@ public:
void SetBaseDir (const char* path);
void SetDirSort (TDirSort sort) { sortDirType = sort; };
bool OpenDir (const char* path);
bool ReadDir (struct dirent* result);
bool ReadDir (struct dirent* &result);
void ExpandName (char* path);
char* GetExpandName (const char* path);
@ -72,7 +72,7 @@ private:
Bit16s GetLongName (CFileInfo* info, char* shortname);
void CreateShortName (CFileInfo* dir, CFileInfo* info);
Bit16u CreateShortNameID (CFileInfo* dir, const char* name);
bool SetResult (CFileInfo* dir, struct dirent* result, Bit16u entryNr);
bool SetResult (CFileInfo* dir, struct dirent* &result, Bit16u entryNr);
bool IsCachedIn (CFileInfo* dir);
CFileInfo* FindDirInfo (const char* path, char* expandedPath);
bool RemoveSpaces (char* str);
@ -91,6 +91,30 @@ private:
};
class DOS_No_Drive_Cache {
public:
DOS_No_Drive_Cache (void) {};
DOS_No_Drive_Cache (const char* path);
~DOS_No_Drive_Cache (void) {};
typedef enum TDirSort { NOSORT, ALPHABETICAL, DIRALPHABETICAL, ALPHABETICALREV, DIRALPHABETICALREV };
void SetBaseDir (const char* path);
void SetDirSort (TDirSort sort) {};
bool OpenDir (const char* path);
bool ReadDir (struct dirent* &result);
void ExpandName (char* path) {};
char* GetExpandName (const char* path) { return (char*)path; };
void CacheOut (const char* path, bool ignoreLastDir = false) {};
void AddEntry (const char* path) {};
public:
char basePath [CROSS_LEN];
char dirPath [CROSS_LEN];
DIR* srch_opendir;
};
class localDrive : public DOS_Drive {
public:
localDrive(const char * startdir,Bit16u _bytes_sector,Bit8u _sectors_cluster,Bit16u _total_clusters,Bit16u _free_clusters,Bit8u _mediaid);