Changeset 295 for cpp/frams/virtfile/virtfile.cpp
- Timestamp:
- 01/15/15 22:43:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/virtfile/virtfile.cpp
r286 r295 22 22 } 23 23 24 intVfexists(const char* path)24 bool Vfexists(const char* path) 25 25 { 26 return VirtFILE::vfs ? VirtFILE::vfs->Vfexists(path) : 0; 26 return VirtFILE::vfs ? VirtFILE::vfs->Vfexists(path) : false; 27 } 28 29 bool Vdirexists(const char* path,bool is_writable) 30 { 31 return VirtFILE::vfs ? VirtFILE::vfs->Vdirexists(path,is_writable) : false; 32 } 33 34 bool Vmkdir(const char* path) 35 { 36 return VirtFILE::vfs ? VirtFILE::vfs->Vmkdir(path) : false; 37 } 38 39 bool Vmkdirs(const char* path) 40 { 41 return VirtFILE::vfs ? VirtFILE::vfs->Vmkdirs(path) : false; 27 42 } 28 43 … … 65 80 66 81 VirtFILE* VirtFileSystem::Vfopen(const char* path,const char*mode) {return 0;} 67 intVirtFileSystem::Vfexists(const char* path) {return 0;}82 bool VirtFileSystem::Vfexists(const char* path) {return 0;} 68 83 VirtDIR* VirtFileSystem::Vopendir(const char* path) {return 0;} 84 bool VirtFileSystem::Vmkdir(const char* path) {return false;} //error - not supported 85 bool VirtFileSystem::Vdirexists(const char* path,bool is_writable) {return false;} 69 86 70 87 ////////////////////////////////////////////////////////////////////////// … … 117 134 dirent* readdir(VirtDIR* d) {return d->Vreaddir();} 118 135 136 ///////// 137 138 bool VirtFileSystem::Vmkdirs(const char* path) 139 { 140 if (Vdirexists(path,true)) return true; 141 string parentdir = getFileDir(path); 142 if (!Vmkdirs(parentdir.c_str())) return false; 143 return Vmkdir(path); 144 } 145 146 ////////// 147 148 VirtFILE *ChainFileSystem::Vfopen(const char* path, const char*mode) 149 { 150 return (chain != NULL) ? chain->Vfopen(path, mode) : NULL; 151 } 152 153 bool ChainFileSystem::Vfexists(const char* path) 154 { 155 return (chain != NULL) ? chain->Vfexists(path) : false; 156 } 157 158 VirtDIR *ChainFileSystem::Vopendir(const char* path) 159 { 160 return (chain != NULL) ? chain->Vopendir(path) : NULL; 161 } 162 163 bool ChainFileSystem::Vmkdir(const char* path) 164 { 165 return (chain != NULL) ? chain->Vmkdir(path) : false; 166 } 167 168 bool ChainFileSystem::Vmkdirs(const char* path) 169 { 170 return (chain != NULL) ? chain->Vmkdirs(path) : false; 171 } 172 173 bool ChainFileSystem::Vdirexists(const char* path,bool is_writable) 174 { 175 return (chain != NULL) ? chain->Vdirexists(path,is_writable) : false; 176 }
Note: See TracChangeset
for help on using the changeset viewer.