Changeset 891 for cpp/common/virtfile
- Timestamp:
- 07/22/19 17:11:36 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/virtfile/virtfile.h
r655 r891 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2019 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 109 109 bool Vfexists(const char* path); 110 110 VirtDIR *Vopendir(const char* path); 111 virtual VirtDIR *internalopendir(const char* path) { return NULL;}111 virtual VirtDIR *internalopendir(const char* path) { return NULL; } 112 112 bool Vmkdir(const char* path); 113 113 bool Vmkdirs(const char* path); 114 114 bool Vdirexists(const char* path, bool is_writable); 115 115 116 class Dir : public VirtDIR116 class Dir : public VirtDIR 117 117 { 118 ChainFileSystem *first;119 VirtFileSystem *second;120 string path;121 std::set<string> duplicates;122 VirtDIR *dir;123 124 Dir(string _path,ChainFileSystem *_first,VirtFileSystem *_second):first(_first),second(_second),path(_path),dir(NULL) {}125 ~Dir();126 dirent* Vreaddir();118 ChainFileSystem *first; 119 VirtFileSystem *second; 120 string path; 121 std::set<string> duplicates; 122 VirtDIR *dir; 123 public: 124 Dir(string _path, ChainFileSystem *_first, VirtFileSystem *_second) :first(_first), second(_second), path(_path), dir(NULL) {} 125 ~Dir(); 126 dirent* Vreaddir(); 127 127 }; 128 128 }; … … 139 139 //required for redefine_stdio.h and for building virtfile.dll, can also be used if someone prefers the standard f-functions instead of explicitly using virtfile objects 140 140 141 DLLEXP int fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f);142 DLLEXP int fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f);141 DLLEXP size_t fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f); 142 DLLEXP size_t fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f); 143 143 144 144 //since we want our own feof(VirtFILE*) function and some systems unfortunately define feof as a macro, we need to #undef it. Same as in virtfile.cpp
Note: See TracChangeset
for help on using the changeset viewer.