31#include "rtabmap/utilite/utilite_export.h"
33#include "rtabmap/utilite/UDirectory.h"
49 static bool exists(
const std::string &filePath);
56 static long length(
const std::string &filePath);
63 static int erase(
const std::string &filePath);
71 static int rename(
const std::string &oldFilePath,
72 const std::string &newFilePath);
79 static std::string
getName(
const std::string & filePath);
92 static void copy(
const std::string & from,
const std::string & to);
99 UFile(
const std::string & path) : path_(path) {}
126 std::string ext = this->getExtension();
130 newPath += std::string(
".") + getExtension(path_);
132 int result = rename(path_, newPath);
154 void copy(
const std::string & to) {
copy(path_, to);}
static std::string getDir(const std::string &filePath)
UFile(const std::string &path)
static int erase(const std::string &filePath)
static std::string getName(const std::string &filePath)
int rename(const std::string &newName)
static int rename(const std::string &oldFilePath, const std::string &newFilePath)
void copy(const std::string &to)
std::string getExtension()
static void copy(const std::string &from, const std::string &to)
static bool exists(const std::string &filePath)
static std::string getExtension(const std::string &filePath)
static long length(const std::string &filePath)