| Index: base/file_util.cc
|
| diff --git a/base/file_util.cc b/base/file_util.cc
|
| index 5bc73cef08161eb9576dfad8aa73c2dad000196a..aea6e626b9b0bb8d8dbcb08068e76a240919ac58 100644
|
| --- a/base/file_util.cc
|
| +++ b/base/file_util.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -194,6 +194,15 @@ bool ReadFileToString(const FilePath& path, std::string* contents) {
|
| return true;
|
| }
|
|
|
| +bool IsDirectoryEmpty(const FilePath& dir_path) {
|
| + FileEnumerator files(dir_path, false,
|
| + static_cast<FileEnumerator::FILE_TYPE>(
|
| + FileEnumerator::FILES | FileEnumerator::DIRECTORIES));
|
| + if (files.Next().value().empty())
|
| + return true;
|
| + return false;
|
| +}
|
| +
|
| FILE* CreateAndOpenTemporaryFile(FilePath* path) {
|
| FilePath directory;
|
| if (!GetTempDir(&directory))
|
|
|