2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

Major scoped-enum refactor

This commit is contained in:
Jack Andersen
2015-11-20 15:13:06 -10:00
parent daa446588b
commit 0a457d854a
23 changed files with 385 additions and 386 deletions

View File

@@ -140,28 +140,28 @@ ProjectPath ProjectPath::getCookedPath(const Database::DataSpecEntry& spec) cons
return ProjectPath(m_proj->getProjectCookedPath(spec), woExt.getRelativePath());
}
ProjectPath::PathType ProjectPath::getPathType() const
ProjectPath::Type ProjectPath::getPathType() const
{
#if WIN32
if (TestShellLink(m_absPath.c_str()))
return PT_LINK;
return Type::Link;
#else
HECL::Sstat lnStat;
if (lstat(m_absPath.c_str(), &lnStat))
return PT_NONE;
return Type::None;
if (S_ISLNK(lnStat.st_mode))
return PT_LINK;
return Type::Link;
#endif
if (std::regex_search(m_absPath, regGLOB))
return PT_GLOB;
return Type::Glob;
Sstat theStat;
if (HECL::Stat(m_absPath.c_str(), &theStat))
return PT_NONE;
return Type::None;
if (S_ISDIR(theStat.st_mode))
return PT_DIRECTORY;
return Type::Directory;
if (S_ISREG(theStat.st_mode))
return PT_FILE;
return PT_NONE;
return Type::File;
return Type::None;
}
Time ProjectPath::getModtime() const