diff options
author | 2016-12-19 14:30:52 +0000 | |
---|---|---|
committer | 2016-12-19 16:15:50 +0000 | |
commit | a4d0ea406e8622e305fc3253075cfee60da3d3d2 (patch) | |
tree | 3ae018781f294f50a391cd2f3423d919b4cedeb1 /src/main/cpp/util/file_platform.h | |
parent | 17380ac67da7860188f778209f144b4c401127a8 (diff) |
Bazel client: SplitPath works with Windows paths
This allows correct behavior of Dirname and
Basename on Windows.
See https://github.com/bazelbuild/bazel/issues/2107
--
PiperOrigin-RevId: 142441234
MOS_MIGRATED_REVID=142441234
Diffstat (limited to 'src/main/cpp/util/file_platform.h')
-rw-r--r-- | src/main/cpp/util/file_platform.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/cpp/util/file_platform.h b/src/main/cpp/util/file_platform.h index 1db579a494..78322dfeb8 100644 --- a/src/main/cpp/util/file_platform.h +++ b/src/main/cpp/util/file_platform.h @@ -26,6 +26,9 @@ class IPipe; IPipe* CreatePipe(); +// Split a path to dirname and basename parts. +std::pair<std::string, std::string> SplitPath(const std::string &path); + // Replaces 'content' with contents of file 'filename'. // If `max_size` is positive, the method reads at most that many bytes; // otherwise the method reads the whole file. |