MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / Close

Method Close

Libraries/unrar/file.cpp:237–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235
236
237bool File::Close()
238{
239 bool Success=true;
240
241 if (hFile!=FILE_BAD_HANDLE)
242 {
243 if (!SkipClose)
244 {
245#ifdef _WIN_ALL
246 // We use the standard system handle for stdout in Windows
247 // and it must not be closed here.
248 if (HandleType==FILE_HANDLENORMAL)
249 Success=CloseHandle(hFile)==TRUE;
250#else
251#ifdef FILE_USE_OPEN
252 Success=close(hFile)!=-1;
253#else
254 Success=fclose(hFile)!=EOF;
255#endif
256#endif
257 }
258 hFile=FILE_BAD_HANDLE;
259 }
260 HandleType=FILE_HANDLENORMAL;
261 if (!Success && AllowExceptions)
262 ErrHandler.CloseError(FileName);
263 return Success;
264}
265
266
267bool File::Delete()

Callers 12

RestoreMethod · 0.45
RestoreMethod · 0.45
UpdateExistingShortNameFunction · 0.45
RecVolumesRestoreFunction · 0.45
RecVolumesTestFunction · 0.45
RARCloseArchiveFunction · 0.45
~SaveFilePosMethod · 0.45
CreateReparsePointFunction · 0.45
MergeArchiveFunction · 0.45
ExtractStreams20Function · 0.45
ExtractStreamsFunction · 0.45
ExtractCurrentFileMethod · 0.45

Calls 1

CloseErrorMethod · 0.80

Tested by

no test coverage detected