Make folly's T_CHECK_TIMEOUT/T_CHECK_TIME_LT use SKIP() on failure
[folly.git] / folly / File.h
index cf8fdc7f71167b464ef5455e56370189a99efb67..459251428d370b37431e191493b55f57f72000d5 100644 (file)
 #ifndef FOLLY_FILE_H_
 #define FOLLY_FILE_H_
 
+#include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <fcntl.h>
 #include <unistd.h>
 
+#include <string>
+
 #include <folly/Portability.h>
+#include <folly/Range.h>
 
 namespace folly {
 
@@ -46,6 +49,9 @@ class File {
    * Open and create a file object.  Throws on error.
    */
   explicit File(const char* name, int flags = O_RDONLY, mode_t mode = 0666);
+  explicit File(
+      const std::string& name, int flags = O_RDONLY, mode_t mode = 0666);
+  explicit File(StringPiece name, int flags = O_RDONLY, mode_t mode = 0666);
 
   ~File();