3 This file is part of libmspfs
4 Copyright © 2006-2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
9 #include <msp/core/except.h>
16 int stat(const Path &fn, struct stat &st)
18 return ::stat(fn.str().c_str(), &st);
21 struct stat stat(const Path &fn)
25 throw SystemError("stat failed", errno);
29 bool exists(const Path &path)
31 return access(path.str().c_str(), F_OK)==0;
34 bool is_dir(const Path &path)
38 return S_ISDIR(st.st_mode);