projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
EventCountTest cleanups
[folly.git]
/
folly
/
FileUtil.h
diff --git
a/folly/FileUtil.h
b/folly/FileUtil.h
index 13dbe5a0f8bd8c06bfc39a54ccc5e2810aea8238..2679f928f1add40886c1e3dfb0b1fe1a23134d08 100644
(file)
--- a/
folly/FileUtil.h
+++ b/
folly/FileUtil.h
@@
-17,9
+17,9
@@
#ifndef FOLLY_FILEUTIL_H_
#define FOLLY_FILEUTIL_H_
#ifndef FOLLY_FILEUTIL_H_
#define FOLLY_FILEUTIL_H_
-#include
"folly/Conv.h"
-#include
"folly/Portability.h"
-#include
"folly/ScopeGuard.h"
+#include
<folly/Conv.h>
+#include
<folly/Portability.h>
+#include
<folly/ScopeGuard.h>
#include <cassert>
#include <limits>
#include <cassert>
#include <limits>
@@
-123,7
+123,7
@@
bool readFile(const char* file_name, Container& out,
"readFile: only containers with byte-sized elements accepted");
assert(file_name);
"readFile: only containers with byte-sized elements accepted");
assert(file_name);
- const auto fd = open(file_name, O_RDONLY);
+ const auto fd = open
NoInt
(file_name, O_RDONLY);
if (fd == -1) return false;
size_t soFar = 0; // amount of bytes successfully read
if (fd == -1) return false;
size_t soFar = 0; // amount of bytes successfully read
@@
-131,7
+131,7
@@
bool readFile(const char* file_name, Container& out,
assert(out.size() >= soFar); // resize better doesn't throw
out.resize(soFar);
// Ignore errors when closing the file
assert(out.size() >= soFar); // resize better doesn't throw
out.resize(soFar);
// Ignore errors when closing the file
- close(fd);
+ close
NoInt
(fd);
};
// Obtain file size:
};
// Obtain file size: