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

Side by Side Diff: base/file_util.h

Issue 11208: Implement some missing file util functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | Annotate | Revision Log
« no previous file with comments | « base/file_path.h ('k') | base/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) 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // Writes the given buffer into the file, overwriting any data that was 305 // Writes the given buffer into the file, overwriting any data that was
306 // previously there. Returns the number of bytes written, or -1 on error. 306 // previously there. Returns the number of bytes written, or -1 on error.
307 int WriteFile(const std::wstring& filename, const char* data, int size); 307 int WriteFile(const std::wstring& filename, const char* data, int size);
308 308
309 // Gets the current working directory for the process. 309 // Gets the current working directory for the process.
310 bool GetCurrentDirectory(FilePath* path); 310 bool GetCurrentDirectory(FilePath* path);
311 // Deprecated temporary compatibility function. 311 // Deprecated temporary compatibility function.
312 bool GetCurrentDirectory(std::wstring* path); 312 bool GetCurrentDirectory(std::wstring* path);
313 313
314 // Sets the current working directory for the process. 314 // Sets the current working directory for the process.
315 bool SetCurrentDirectory(const FilePath& path);
316 // Deprecated temporary compatibility function.
315 bool SetCurrentDirectory(const std::wstring& current_directory); 317 bool SetCurrentDirectory(const std::wstring& current_directory);
316 318
317 // A class for enumerating the files in a provided path. The order of the 319 // A class for enumerating the files in a provided path. The order of the
318 // results is not guaranteed. 320 // results is not guaranteed.
319 // 321 //
320 // DO NOT USE FROM THE MAIN THREAD of your application unless it is a test 322 // DO NOT USE FROM THE MAIN THREAD of your application unless it is a test
321 // program where latency does not matter. This class is blocking. 323 // program where latency does not matter. This class is blocking.
322 class FileEnumerator { 324 class FileEnumerator {
323 public: 325 public:
324 enum FILE_TYPE { 326 enum FILE_TYPE {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 387
386 // Renames a file using the SHFileOperation API to ensure that the target file 388 // Renames a file using the SHFileOperation API to ensure that the target file
387 // gets the correct default security descriptor in the new path. 389 // gets the correct default security descriptor in the new path.
388 bool RenameFileAndResetSecurityDescriptor( 390 bool RenameFileAndResetSecurityDescriptor(
389 const std::wstring& source_file_path, 391 const std::wstring& source_file_path,
390 const std::wstring& target_file_path); 392 const std::wstring& target_file_path);
391 393
392 } // namespace file_util 394 } // namespace file_util
393 395
394 #endif // BASE_FILE_UTIL_H_ 396 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « base/file_path.h ('k') | base/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698