MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / close

Method close

engine/source/platformAndroid/AndroidFileio.cpp:460–492  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Close the File. Returns the currentStatus -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

458// Returns the currentStatus
459//-----------------------------------------------------------------------------
460File::Status File::close()
461{
462 if (handle != NULL)
463 {
464 // check if it's already closed...
465 if (Closed == currentStatus)
466 return currentStatus;
467
468 // it's not, so close it...
469 if (handle != NULL)
470 {
471 if (fclose((FILE*)handle) != 0)
472 return setStatus();
473 }
474 handle = NULL;
475 return currentStatus = Closed;
476 }
477
478 // check if it's already closed...
479 if (Closed == currentStatus)
480 return currentStatus;
481
482 // it's not, so close it...
483 if (buffer != NULL)
484 {
485 delete[] buffer;
486 buffer = NULL;
487 size = 0;
488 filePointer = 0;
489 }
490
491 return currentStatus = Closed;
492}
493
494//-----------------------------------------------------------------------------
495// Self-explanatory.

Callers 1

_AndroidGetTxtFileArgsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected