X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FFile.h;h=459251428d370b37431e191493b55f57f72000d5;hb=344f7d2ae913dfb342810464e3b030acfddf584d;hp=4a25e1c6938f82ad6dba340450116a4ed8e71550;hpb=75c6adfae4a1842511e8b62150cc18ffb391efa7;p=folly.git diff --git a/folly/File.h b/folly/File.h index 4a25e1c6..45925142 100644 --- a/folly/File.h +++ b/folly/File.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2015 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,15 @@ #ifndef FOLLY_FILE_H_ #define FOLLY_FILE_H_ +#include #include #include -#include #include +#include + #include +#include 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();