+/*
+This file is part of libmsppath
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
#ifndef MSP_PATH_UTILS_H_
#define MSP_PATH_UTILS_H_
extern bool exists(const Path &);
extern Filename splitext(const std::string &);
extern int fnmatch(const std::string &, const Path &);
+extern Path relative(const Path &, const Path &);
inline int stat(const Path &fn, struct stat &st)
{ return ::stat(fn.str().c_str(), &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