MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / EndFileImpl

Method EndFileImpl

Goldleaf/source/fs/fs_StdExplorer.cpp:190–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188 }
189
190 void StdExplorer::EndFileImpl(const FileMode mode) {
191 switch(mode) {
192 case FileMode::Read: {
193 if(this->r_file_obj != nullptr) {
194 fclose(this->r_file_obj);
195 this->r_file_obj = nullptr;
196 }
197 break;
198 }
199 default: {
200 if(this->w_file_obj != nullptr) {
201 fclose(this->w_file_obj);
202 this->w_file_obj = nullptr;
203 this->DoCommit();
204 }
205 break;
206 }
207 }
208 }
209
210 u64 StdExplorer::ReadFile(const std::string &path, const u64 offset, const u64 size, void *read_buf) {
211 if(this->r_file_obj != nullptr) {

Callers 1

EndFileMethod · 0.45

Calls 1

DoCommitMethod · 0.95

Tested by

no test coverage detected