more safexx posix stuff

This commit is contained in:
Jean-Francois Dockes
2015-08-22 08:37:58 +02:00
parent f095e38633
commit 62f4f7bd81
18 changed files with 50 additions and 18 deletions
+5
View File
@@ -433,6 +433,11 @@ long long path_filesize(const string& path)
return (long long)st.st_size;
}
bool path_exists(const string& path)
{
return access(path.c_str(), 0) == 0;
}
// Allowed punctuation in the path part of an URI according to RFC2396
// -_.!~*'():@&=+$,
/*