1
0
Fork 0

added FileStat and FileExits to the drives

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@110
This commit is contained in:
Peter Veenstra 2002-08-06 09:19:56 +00:00
parent a4c775bff4
commit 1b31218f2b
3 changed files with 61 additions and 3 deletions

View file

@ -21,7 +21,7 @@
#include <sys/types.h>
#include <dirent.h>
#include "dos_system.h"
class localDrive : public DOS_Drive {
public:
@ -37,6 +37,8 @@ public:
bool GetFileAttr(char * name,Bit16u * attr);
bool Rename(char * oldname,char * newname);
bool FreeSpace(Bit16u * bytes,Bit16u * sectors,Bit16u * clusters,Bit16u * free);
bool FileExists(const char* name) const ;
bool FileStat(const char* name, struct stat* const stat_block) const;
private:
bool FillDTABlock(DTA_FindBlock * dta);
char basedir[512];
@ -63,6 +65,9 @@ public:
bool GetFileAttr(char * name,Bit16u * attr);
bool Rename(char * oldname,char * newname);
bool FreeSpace(Bit16u * bytes,Bit16u * sectors,Bit16u * clusters,Bit16u * free);
bool FileExists(const char* name) const ;
bool FileStat(const char* name, struct stat* const stat_block) const;
private:
VFILE_Block * search_file;
char search_string[255];