aboutsummaryrefslogtreecommitdiff
path: root/butl/filesystem.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-28 11:03:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-28 11:03:00 +0200
commit039f62b48a14fefabae07d8c008e2e131deadfc6 (patch)
tree109212c7e0633537ea3701b2f3037f909188c92c /butl/filesystem.cxx
parent31b316e1da75d4da75ee8def2c64fcf03c0dfe8f (diff)
Add few filesystem function overloads for C-string paths
Diffstat (limited to 'butl/filesystem.cxx')
-rw-r--r--butl/filesystem.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/butl/filesystem.cxx b/butl/filesystem.cxx
index 9db8814..5584e00 100644
--- a/butl/filesystem.cxx
+++ b/butl/filesystem.cxx
@@ -35,14 +35,14 @@ using namespace std;
namespace butl
{
bool
- file_exists (const path& p)
+ file_exists (const char* p)
{
#ifndef _WIN32
struct stat s;
- if (stat (p.string ().c_str (), &s) != 0)
+ if (stat (p, &s) != 0)
#else
struct _stat s;
- if (_stat (p.string ().c_str (), &s) != 0)
+ if (_stat (p, &s) != 0)
#endif
{
if (errno == ENOENT || errno == ENOTDIR)
@@ -55,14 +55,14 @@ namespace butl
}
bool
- dir_exists (const path& p)
+ dir_exists (const char* p)
{
#ifndef _WIN32
struct stat s;
- if (stat (p.string ().c_str (), &s) != 0)
+ if (stat (p, &s) != 0)
#else
struct _stat s;
- if (_stat (p.string ().c_str (), &s) != 0)
+ if (_stat (p, &s) != 0)
#endif
{
if (errno == ENOENT || errno == ENOTDIR)
@@ -294,14 +294,14 @@ namespace butl
nsec (...) {return 0;}
timestamp
- file_mtime (const path& p)
+ file_mtime (const char* p)
{
#ifndef _WIN32
struct stat s;
- if (stat (p.string ().c_str (), &s) != 0)
+ if (stat (p, &s) != 0)
#else
struct _stat s;
- if (_stat (p.string ().c_str (), &s) != 0)
+ if (_stat (p, &s) != 0)
#endif
{
if (errno == ENOENT || errno == ENOTDIR)