mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add utility for checking if a file is empty or not
This commit is contained in:
parent
3b237a827f
commit
b0fc8fb46c
@ -13,6 +13,13 @@ BOOL FileExists(const fs::path& svFilePath)
|
||||
return fs::exists(svFilePath);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// For checking if a specific file is empty.
|
||||
BOOL FileEmpty(ifstream& pFile)
|
||||
{
|
||||
return pFile.peek() == ifstream::traits_type::eof();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// For checking if pointer is valid or bad.
|
||||
BOOL IsBadReadPtrV2(void* ptr)
|
||||
|
@ -4,6 +4,7 @@
|
||||
// Internals
|
||||
BOOL IsBadReadPtrV2(void* ptr);
|
||||
BOOL FileExists(const fs::path& svFilePath);
|
||||
BOOL FileEmpty(ifstream& pFile);
|
||||
MODULEINFO GetModuleInfo(const char* szModule);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user