mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Added current filepath helper.:
This commit is contained in:
@@ -17,6 +17,7 @@ namespace bx
|
||||
{
|
||||
enum Enum ///
|
||||
{
|
||||
Current,
|
||||
Temp,
|
||||
Home,
|
||||
|
||||
|
||||
@@ -153,6 +153,14 @@ namespace bx
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool getCurrentPath(char* _out, uint32_t* _inOutSize)
|
||||
{
|
||||
uint32_t len = *_inOutSize;
|
||||
pwd(_out, len);
|
||||
*_inOutSize = strLen(_out);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool getHomePath(char* _out, uint32_t* _inOutSize)
|
||||
{
|
||||
return false
|
||||
@@ -242,6 +250,10 @@ namespace bx
|
||||
|
||||
switch (_dir)
|
||||
{
|
||||
case Dir::Current:
|
||||
getCurrentPath(tmp, &len);
|
||||
break;
|
||||
|
||||
case Dir::Temp:
|
||||
getTempPath(tmp, &len);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user