| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_FILE_UTIL_H_ | 8 #ifndef BASE_FILE_UTIL_H_ |
| 9 #define BASE_FILE_UTIL_H_ | 9 #define BASE_FILE_UTIL_H_ |
| 10 | 10 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Deprecated temporary compatibility function. | 289 // Deprecated temporary compatibility function. |
| 290 bool CreateTemporaryFileName(std::wstring* temp_file); | 290 bool CreateTemporaryFileName(std::wstring* temp_file); |
| 291 | 291 |
| 292 // Create and open a temporary file. File is opened for read/write. | 292 // Create and open a temporary file. File is opened for read/write. |
| 293 // The full path is placed in |path|, and the function returns true if | 293 // The full path is placed in |path|, and the function returns true if |
| 294 // was successful in creating and opening the file. | 294 // was successful in creating and opening the file. |
| 295 FILE* CreateAndOpenTemporaryFile(FilePath* path); | 295 FILE* CreateAndOpenTemporaryFile(FilePath* path); |
| 296 // Like above but for shmem files. Only useful for POSIX. | 296 // Like above but for shmem files. Only useful for POSIX. |
| 297 FILE* CreateAndOpenTemporaryShmemFile(FilePath* path); | 297 FILE* CreateAndOpenTemporaryShmemFile(FilePath* path); |
| 298 | 298 |
| 299 // Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|. |
| 300 FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path); |
| 301 |
| 299 // Same as CreateTemporaryFileName but the file is created in |dir|. | 302 // Same as CreateTemporaryFileName but the file is created in |dir|. |
| 300 bool CreateTemporaryFileNameInDir(const std::wstring& dir, | 303 bool CreateTemporaryFileNameInDir(const std::wstring& dir, |
| 301 std::wstring* temp_file); | 304 std::wstring* temp_file); |
| 302 | 305 |
| 303 // Create a new directory under TempPath. If prefix is provided, the new | 306 // Create a new directory under TempPath. If prefix is provided, the new |
| 304 // directory name is in the format of prefixyyyy. | 307 // directory name is in the format of prefixyyyy. |
| 305 // NOTE: prefix is ignored in the POSIX implementation. | 308 // NOTE: prefix is ignored in the POSIX implementation. |
| 306 // TODO(erikkay): is this OK? | 309 // TODO(erikkay): is this OK? |
| 307 // If success, return true and output the full path of the directory created. | 310 // If success, return true and output the full path of the directory created. |
| 308 bool CreateNewTempDirectory(const FilePath::StringType& prefix, | 311 bool CreateNewTempDirectory(const FilePath::StringType& prefix, |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 513 |
| 511 // Renames a file using the SHFileOperation API to ensure that the target file | 514 // Renames a file using the SHFileOperation API to ensure that the target file |
| 512 // gets the correct default security descriptor in the new path. | 515 // gets the correct default security descriptor in the new path. |
| 513 bool RenameFileAndResetSecurityDescriptor( | 516 bool RenameFileAndResetSecurityDescriptor( |
| 514 const FilePath& source_file_path, | 517 const FilePath& source_file_path, |
| 515 const FilePath& target_file_path); | 518 const FilePath& target_file_path); |
| 516 | 519 |
| 517 } // namespace file_util | 520 } // namespace file_util |
| 518 | 521 |
| 519 #endif // BASE_FILE_UTIL_H_ | 522 #endif // BASE_FILE_UTIL_H_ |
| OLD | NEW |