tyrav2 init
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2020 - 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Wellington Carvalho <wellcoj@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
class FileUtils {
|
||||
public:
|
||||
FileUtils();
|
||||
~FileUtils();
|
||||
|
||||
static std::string getCwd();
|
||||
static std::string fromCwd(const char* relativePath);
|
||||
|
||||
const char* getElfName() const { return elfName; };
|
||||
const char* getElfPath() const { return elfPath; };
|
||||
|
||||
private:
|
||||
// Argv name+path & just path
|
||||
char cwd[NAME_MAX];
|
||||
char elfName[NAME_MAX];
|
||||
char elfPath[NAME_MAX - 14];
|
||||
|
||||
void setPathInfo(const char* path);
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
Reference in New Issue
Block a user