Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: base/file_util.cc

Issue 164537: Renames the function CreateTemporaryFilename to CreateTemporaryFile and track... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: CommandLine fix Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util.h ('k') | base/file_util_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #endif 9 #endif
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 FilePath::StringType dir_prefix(prefix); 336 FilePath::StringType dir_prefix(prefix);
337 #elif defined(OS_POSIX) 337 #elif defined(OS_POSIX)
338 FilePath::StringType dir_prefix = WideToUTF8(prefix); 338 FilePath::StringType dir_prefix = WideToUTF8(prefix);
339 #endif 339 #endif
340 FilePath temp_path; 340 FilePath temp_path;
341 if (!CreateNewTempDirectory(dir_prefix, &temp_path)) 341 if (!CreateNewTempDirectory(dir_prefix, &temp_path))
342 return false; 342 return false;
343 *new_temp_path = temp_path.ToWStringHack(); 343 *new_temp_path = temp_path.ToWStringHack();
344 return true; 344 return true;
345 } 345 }
346 bool CreateTemporaryFileName(std::wstring* temp_file) {
347 FilePath temp_file_path;
348 if (!CreateTemporaryFileName(&temp_file_path))
349 return false;
350 *temp_file = temp_file_path.ToWStringHack();
351 return true;
352 }
353 bool Delete(const std::wstring& path, bool recursive) { 346 bool Delete(const std::wstring& path, bool recursive) {
354 return Delete(FilePath::FromWStringHack(path), recursive); 347 return Delete(FilePath::FromWStringHack(path), recursive);
355 } 348 }
356 bool DirectoryExists(const std::wstring& path) { 349 bool DirectoryExists(const std::wstring& path) {
357 return DirectoryExists(FilePath::FromWStringHack(path)); 350 return DirectoryExists(FilePath::FromWStringHack(path));
358 } 351 }
359 bool EndsWithSeparator(std::wstring* path) { 352 bool EndsWithSeparator(std::wstring* path) {
360 return EndsWithSeparator(FilePath::FromWStringHack(*path)); 353 return EndsWithSeparator(FilePath::FromWStringHack(*path));
361 } 354 }
362 bool EndsWithSeparator(const std::wstring& path) { 355 bool EndsWithSeparator(const std::wstring& path) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 443
451 bool FileEnumerator::IsDot(const FilePath& path) { 444 bool FileEnumerator::IsDot(const FilePath& path) {
452 return FILE_PATH_LITERAL(".") == path.BaseName().value(); 445 return FILE_PATH_LITERAL(".") == path.BaseName().value();
453 } 446 }
454 447
455 bool FileEnumerator::IsDotDot(const FilePath& path) { 448 bool FileEnumerator::IsDotDot(const FilePath& path) {
456 return FILE_PATH_LITERAL("..") == path.BaseName().value(); 449 return FILE_PATH_LITERAL("..") == path.BaseName().value();
457 } 450 }
458 451
459 } // namespace 452 } // namespace
OLDNEW
« no previous file with comments | « base/file_util.h ('k') | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698