aboutsummaryrefslogtreecommitdiff
path: root/src/posix_extras.cc
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-20 15:27:41 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 20:38:02 -0500
commitae657efd38d9fcf21b9fddc83c83d095e4f284b7 (patch)
tree464ec0500f14a4bb280a69ebc26d806d87b0d6f5 /src/posix_extras.cc
parentf4b0c2e93a2f45b548465dba84b257bcb3b41446 (diff)
Unify File::OpenAt functions
Diffstat (limited to 'src/posix_extras.cc')
-rw-r--r--src/posix_extras.cc13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/posix_extras.cc b/src/posix_extras.cc
index 6844785..359240f 100644
--- a/src/posix_extras.cc
+++ b/src/posix_extras.cc
@@ -75,19 +75,6 @@ struct stat File::LinkStatAt(const char* const path) const {
return result;
}
-File File::OpenAt(const char* const path, const int flags) const {
- if (path[0] == '/') {
- throw std::invalid_argument("absolute path");
- }
-
- File result;
- if ((result.fd_ = openat(fd_, path, flags)) == -1) {
- throw SystemError();
- }
- result.path_ = path_ + "/" + path;
- return result;
-}
-
File File::OpenAt(const char* const path, const int flags,
const mode_t mode) const {
if (path[0] == '/') {