X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Futils.h;h=961ad499674666629ecc7b635d04032e2b5d63ac;hb=6f4ac56492d45c04df0f205252b3c3210e319b4f;hp=e0c559d0450a47a2f79c873609f4ac76e32bfe0d;hpb=66bdaa1f9f833e18a07d061208ce6080f3abac06;p=libs%2Fcore.git diff --git a/source/utils.h b/source/utils.h index e0c559d..961ad49 100644 --- a/source/utils.h +++ b/source/utils.h @@ -35,6 +35,9 @@ inline int stat(const Path &fn, struct stat &st) inline Path getcwd() { char buf[1024]; return ::getcwd(buf, sizeof(buf)); } +inline bool is_windows_drive(const std::string &p) +{ return (p.size()==2 && ((p[0]>='A' && p[0]<='Z') || (p[0]>='a' && p[0]<='z')) && p[1]==':'); } + } // namespace Path } // namespace Msp