summaryrefslogtreecommitdiffstats
path: root/base/file_util_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util_posix.cc')
-rw-r--r--base/file_util_posix.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index a919b16..0b7763e 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -424,11 +424,10 @@ FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path) {
return fdopen(fd, "a+");
}
-// TODO(port): implement me.
-bool CreateTemporaryFileInDir(const FilePath& dir,
- FilePath* temp_file) {
- NOTREACHED();
- return false;
+
+bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file) {
+ int fd = CreateAndOpenFdForTemporaryFile(dir, temp_file);
+ return ((fd >= 0) && !close(fd));
}
bool CreateNewTempDirectory(const FilePath::StringType& prefix,