29 lines
568 B
C++
29 lines
568 B
C++
#ifndef JES_PATH_H
|
|
#define JES_PATH_H
|
|
|
|
#include "Ref.h"
|
|
#include <string>
|
|
#include <vector>
|
|
#include <stdint.h>
|
|
|
|
class Path;
|
|
typedef Ref<Path> PathRef;
|
|
class Path
|
|
{
|
|
public:
|
|
Path(const char * path);
|
|
Path(const std::string & path);
|
|
PathRef dirname();
|
|
PathRef ext(const std::string & new_ext);
|
|
PathRef join(const Path & other);
|
|
const std::string & to_s() { return m_path; }
|
|
bool exists();
|
|
std::vector<std::string> dir_entries();
|
|
bool read(uint8_t ** buf, size_t * size);
|
|
protected:
|
|
void clean();
|
|
std::string m_path;
|
|
};
|
|
|
|
#endif
|