OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 // Same as CreateTemporaryFile but the file is created in |dir|. | 261 // Same as CreateTemporaryFile but the file is created in |dir|. |
262 bool CreateTemporaryFileInDir(const FilePath& dir, | 262 bool CreateTemporaryFileInDir(const FilePath& dir, |
263 FilePath* temp_file); | 263 FilePath* temp_file); |
264 | 264 |
265 // Create a directory within another directory. | 265 // Create a directory within another directory. |
266 // Extra characters will be appended to |name_tmpl| to ensure that the | 266 // Extra characters will be appended to |name_tmpl| to ensure that the |
267 // new directory does not have the same name as an existing directory. | 267 // new directory does not have the same name as an existing directory. |
268 bool CreateTemporaryDirInDir(const FilePath& base_dir, | 268 bool CreateTemporaryDirInDir(const FilePath& base_dir, |
269 const FilePath::StringType& prefix, | 269 const FilePath::StringType& prefix, |
270 FilePath* new_dir, | 270 FilePath* new_dir); |
271 bool lossen_permissions); | |
272 | 271 |
273 // Create a new directory under TempPath. If prefix is provided, the new | 272 // Create a new directory under TempPath. If prefix is provided, the new |
274 // directory name is in the format of prefixyyyy. | 273 // directory name is in the format of prefixyyyy. |
275 // NOTE: prefix is ignored in the POSIX implementation. | 274 // NOTE: prefix is ignored in the POSIX implementation. |
276 // TODO(erikkay): is this OK? | 275 // TODO(erikkay): is this OK? |
277 // If success, return true and output the full path of the directory created. | 276 // If success, return true and output the full path of the directory created. |
278 bool CreateNewTempDirectory(const FilePath::StringType& prefix, | 277 bool CreateNewTempDirectory(const FilePath::StringType& prefix, |
279 FilePath* new_temp_path); | 278 FilePath* new_temp_path); |
280 | 279 |
281 // Creates a directory, as well as creating any parent directories, if they | 280 // Creates a directory, as well as creating any parent directories, if they |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 598 |
600 #endif // UNIT_TEST | 599 #endif // UNIT_TEST |
601 | 600 |
602 } // namespace file_util | 601 } // namespace file_util |
603 | 602 |
604 // Deprecated functions have been moved to this separate header file, | 603 // Deprecated functions have been moved to this separate header file, |
605 // which must be included last after all the above definitions. | 604 // which must be included last after all the above definitions. |
606 #include "base/file_util_deprecated.h" | 605 #include "base/file_util_deprecated.h" |
607 | 606 |
608 #endif // BASE_FILE_UTIL_H_ | 607 #endif // BASE_FILE_UTIL_H_ |
OLD | NEW |