3 This file is part of libmspfs
4 Copyright © 2006-2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_FS_UTILS_H_
9 #define MSP_FS_UTILS_H_
22 Path fix_case(const Path &path);
25 void unlink(const Path &path);
27 Filename splitext(const std::string &);
28 int fnmatch(const std::string &, const Path &);
30 /// Makes a path relative to some base path. That is, base/result==path.
31 Path relative(const Path &path, const Path &base);
33 std::string basename(const std::string &);
35 inline bool is_windows_drive(const std::string &p)
36 { return (p.size()==2 && ((p[0]>='A' && p[0]<='Z') || (p[0]>='a' && p[0]<='z')) && p[1]==':'); }