Added File::Open(path, mode)
Former-commit-id: 7bd80f04e5f902e9752b1f5091ac55cdf2bc432a
This commit is contained in:
@@ -49,8 +49,7 @@ m_endianness(nzEndianness_Unknown),
|
||||
m_impl(nullptr),
|
||||
m_openMode(0)
|
||||
{
|
||||
SetFile(filePath);
|
||||
Open(openMode);
|
||||
Open(filePath, openMode);
|
||||
}
|
||||
|
||||
NzFile::NzFile(NzFile&& file) noexcept :
|
||||
@@ -313,6 +312,16 @@ bool NzFile::Open(unsigned long openMode)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NzFile::Open(const NzString& filePath, unsigned long openMode)
|
||||
{
|
||||
NazaraLock(m_mutex)
|
||||
|
||||
Close();
|
||||
|
||||
SetFile(filePath);
|
||||
return Open(openMode);
|
||||
}
|
||||
|
||||
bool NzFile::SetCursorPos(CursorPosition pos, nzInt64 offset)
|
||||
{
|
||||
NazaraLock(m_mutex)
|
||||
|
||||
Reference in New Issue
Block a user