diff options
author | 2017-01-10 16:06:42 +0000 | |
---|---|---|
committer | 2017-01-10 19:42:02 +0000 | |
commit | 93faf597b35c0638a66dbb32da4db5aa831caecf (patch) | |
tree | 0f10a5a8add3f436e044f3335670a3f95322573e /src/main/cpp/util/file_posix.cc | |
parent | 2f23599dda8f580234fc5a97675561cc86127444 (diff) |
Bazel client, Windows: implement IsDirectory
See https://github.com/bazelbuild/bazel/issues/2107
--
PiperOrigin-RevId: 144084379
MOS_MIGRATED_REVID=144084379
Diffstat (limited to 'src/main/cpp/util/file_posix.cc')
-rw-r--r-- | src/main/cpp/util/file_posix.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/cpp/util/file_posix.cc b/src/main/cpp/util/file_posix.cc index f4890a0294..466bae499d 100644 --- a/src/main/cpp/util/file_posix.cc +++ b/src/main/cpp/util/file_posix.cc @@ -248,12 +248,12 @@ bool CanAccess(const string& path, bool read, bool write, bool exec) { return access(path.c_str(), mode) == 0; } +#ifndef __CYGWIN__ bool IsDirectory(const string& path) { struct stat buf; return stat(path.c_str(), &buf) == 0 && S_ISDIR(buf.st_mode); } -#ifndef __CYGWIN__ bool IsRootDirectory(const string &path) { return path.size() == 1 && path[0] == '/'; } |