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

Side by Side Diff: base/files/file_util.h

Issue 603683005: base::CopyFile can copy *from* Android's content scheme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base::internal::CopyFileUnsafe -> base::CopyFile Created 6 years, 1 month 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
« no previous file with comments | « no previous file | base/files/file_util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file contains utility functions for dealing with the local 5 // This file contains utility functions for dealing with the local
6 // filesystem. 6 // filesystem.
7 7
8 #ifndef BASE_FILES_FILE_UTIL_H_ 8 #ifndef BASE_FILES_FILE_UTIL_H_
9 #define BASE_FILES_FILE_UTIL_H_ 9 #define BASE_FILES_FILE_UTIL_H_
10 10
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 // Internal -------------------------------------------------------------------- 415 // Internal --------------------------------------------------------------------
416 416
417 namespace internal { 417 namespace internal {
418 418
419 // Same as Move but allows paths with traversal components. 419 // Same as Move but allows paths with traversal components.
420 // Use only with extreme care. 420 // Use only with extreme care.
421 BASE_EXPORT bool MoveUnsafe(const FilePath& from_path, 421 BASE_EXPORT bool MoveUnsafe(const FilePath& from_path,
422 const FilePath& to_path); 422 const FilePath& to_path);
423 423
424 // Same as CopyFile but allows paths with traversal components.
425 // Use only with extreme care.
426 BASE_EXPORT bool CopyFileUnsafe(const FilePath& from_path,
427 const FilePath& to_path);
428
429 #if defined(OS_WIN) 424 #if defined(OS_WIN)
430 // Copy from_path to to_path recursively and then delete from_path recursively. 425 // Copy from_path to to_path recursively and then delete from_path recursively.
431 // Returns true if all operations succeed. 426 // Returns true if all operations succeed.
432 // This function simulates Move(), but unlike Move() it works across volumes. 427 // This function simulates Move(), but unlike Move() it works across volumes.
433 // This function is not transactional. 428 // This function is not transactional.
434 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, 429 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path,
435 const FilePath& to_path); 430 const FilePath& to_path);
436 #endif // defined(OS_WIN) 431 #endif // defined(OS_WIN)
437 432
438 } // namespace internal 433 } // namespace internal
439 } // namespace base 434 } // namespace base
440 435
441 #endif // BASE_FILES_FILE_UTIL_H_ 436 #endif // BASE_FILES_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/files/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698