2 This file is part of libmsppath
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
6 #ifndef MSP_PATH_UTILS_H_
7 #define MSP_PATH_UTILS_H_
24 extern Path fix_case(const Path &);
25 extern int mkpath(const Path &, int);
26 extern int rmdir(const Path &, bool =false);
27 extern std::list<std::string> list_files(const Path &);
28 extern bool exists(const Path &);
29 extern Filename splitext(const std::string &);
30 extern int fnmatch(const std::string &, const Path &);
32 inline int stat(const Path &fn, struct stat &st)
33 { return ::stat(fn.str().c_str(), &st); }
36 { char buf[1024]; return ::getcwd(buf, sizeof(buf)); }