23#include "rtabmap/utilite/utilite_export.h"
25#include "rtabmap/utilite/UDirectory.h"
41 static bool exists(
const std::string &filePath);
48 static long length(
const std::string &filePath);
55 static int erase(
const std::string &filePath);
63 static int rename(
const std::string &oldFilePath,
64 const std::string &newFilePath);
71 static std::string
getName(
const std::string & filePath);
84 static void copy(
const std::string & from,
const std::string & to);
91 UFile(
const std::string & path) : path_(path) {}
118 std::string ext = this->getExtension();
122 newPath += std::string(
".") + getExtension(path_);
124 int result = rename(path_, newPath);
146 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)