mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 18:12:29 +00:00
feat(os): implement OsSetCurrentDirectory and OsGetCurrentDirectory
This commit is contained in:
parent
32f791ac70
commit
90075755b1
4 changed files with 30 additions and 0 deletions
|
|
@ -146,3 +146,15 @@ int64_t OsSetFilePointer(HOSFILE fileHandle, int64_t distanceToMove, uint32_t mo
|
|||
void OsCloseFile(HOSFILE fileHandle) {
|
||||
Blizzard::File::Close(static_cast<Blizzard::File::StreamRecord*>(fileHandle));
|
||||
}
|
||||
|
||||
int32_t OsSetCurrentDirectory(const char* pathName) {
|
||||
BLIZZARD_ASSERT(pathName);
|
||||
|
||||
return Blizzard::File::SetWorkingDirectory(pathName);
|
||||
}
|
||||
|
||||
int32_t OsGetCurrentDirectory(size_t pathLen, char* pathName) {
|
||||
BLIZZARD_ASSERT(pathName);
|
||||
|
||||
return Blizzard::File::GetWorkingDirectory(pathName, pathLen);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,4 +64,8 @@ void OsCloseFile(HOSFILE fileHandle);
|
|||
|
||||
int64_t OsSetFilePointer(HOSFILE fileHandle, int64_t distanceToMove, uint32_t moveMethod);
|
||||
|
||||
int32_t OsSetCurrentDirectory(const char* pathName);
|
||||
|
||||
int32_t OsGetCurrentDirectory(size_t pathLen, char* pathName);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue