2024-11-14 16:04:54 +08:00
|
|
|
#ifndef OFEN_PATH_HEADER
|
|
|
|
#define OFEN_PATH_HEADER
|
|
|
|
|
2024-11-15 13:16:04 +08:00
|
|
|
#include "of_def.hpp"
|
2024-11-14 16:04:54 +08:00
|
|
|
|
|
|
|
namespace ofen {
|
|
|
|
class COfPath
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
COfPath();
|
|
|
|
~COfPath();
|
|
|
|
|
|
|
|
public:
|
2024-11-29 10:39:00 +08:00
|
|
|
static bool isSamePath(const ofString& pa, const ofString& pb);
|
|
|
|
static ofString normalizePath(const ofString& path);
|
|
|
|
static ofString replaceStr(const ofString& str, const ofString& from, const ofString& to);
|
2024-11-29 10:53:51 +08:00
|
|
|
static ofString getFullRunPath();
|
|
|
|
static ofString getHome();
|
2024-12-01 17:03:56 +08:00
|
|
|
static ofString getConfigDir(const ofString& sub_dir, bool create = false);
|
|
|
|
static ofString getFull(const ofString& path, const ofString& sub_file_path);
|
|
|
|
static bool isExist(const ofString& path);
|
|
|
|
static bool writeBin(const ofString& path, const char* data, int len);
|
2024-11-14 16:04:54 +08:00
|
|
|
};
|
|
|
|
}; // namespace ofen
|
|
|
|
#endif
|