Core/File: Add OpenMode::Defer
This commit is contained in:
@@ -33,6 +33,20 @@ namespace Nz
|
||||
{
|
||||
return Nz::ComputeHash(hash, File(filePath));
|
||||
}
|
||||
|
||||
inline bool File::CheckFileOpening()
|
||||
{
|
||||
if (m_openMode.Test(OpenMode::Defer))
|
||||
{
|
||||
if (!Open(m_filePath, m_openMode & ~OpenMode::Defer))
|
||||
{
|
||||
NazaraError("failed to open file");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
||||
Reference in New Issue
Block a user