bool gIsProject(const char *path) { /** FIXME - checks too weak */ if (gGetExt(path) == "gprj" && gDirExists(path)) return 1; return 0; }
void Wave::updateName(const char *n) { std::string ext = gGetExt(pathfile.c_str()); name = gStripExt(gBasename(n).c_str()); pathfile = gDirname(pathfile.c_str()) + gGetSlash() + name + "." + ext; isLogical = true; /* a wave with updated name must become logical, since the underlying * file does not exist yet. */ }
void Wave::updateName(const char *n) { std::string ext = gGetExt(pathfile.c_str()); name = gStripExt(gBasename(n).c_str()); pathfile = gDirname(pathfile.c_str()) + gGetSlash() + name + "." + ext; isLogical = true; }
std::string Wave::extension() const { return gGetExt(pathfile.c_str()); }
bool gIsPatch(const char *path) { if (gGetExt(path) == "gptc") return 1; return 0; }