X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FFile.cpp;h=3c53573355fc6a9d2dec13e50d36a323d83680e2;hb=47241bf82f54365511b514bf83c9895af68fa6ab;hp=379efe62eb0c650c5d06b82650635594240f4e1d;hpb=ec3c8f790fc7e8d870d518211e124830c4bdf1d3;p=folly.git diff --git a/folly/File.cpp b/folly/File.cpp index 379efe62..3c535733 100644 --- a/folly/File.cpp +++ b/folly/File.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -52,6 +53,12 @@ File::File(const char* name, int flags, mode_t mode) ownsFd_ = true; } +File::File(const std::string& name, int flags, mode_t mode) + : File(name.c_str(), flags, mode) {} + +File::File(StringPiece name, int flags, mode_t mode) + : File(name.str(), flags, mode) {} + File::File(File&& other) noexcept : fd_(other.fd_) , ownsFd_(other.ownsFd_) {