X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Futils.h;h=961ad499674666629ecc7b635d04032e2b5d63ac;hp=e0c559d0450a47a2f79c873609f4ac76e32bfe0d;hb=058953b54ba1a3fbf95db92a0e60e6c9581bfb6b;hpb=f2afab73c3350c54c8b5a985d2b055563c6a6e9f 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