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

Side by Side Diff: base/file_util.h

Issue 6402: Fix some problems with machine level install. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | « no previous file | base/file_util_win.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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // link already exists (otherwise false is returned). Ensure you have 199 // link already exists (otherwise false is returned). Ensure you have
200 // initialized COM before calling into this function. Only 'destination' 200 // initialized COM before calling into this function. Only 'destination'
201 // parameter is required, everything else can be NULL (but if everything else 201 // parameter is required, everything else can be NULL (but if everything else
202 // is NULL no changes are made to the shortcut). 'destination' is the link 202 // is NULL no changes are made to the shortcut). 'destination' is the link
203 // file to be updated. For best results pass the filename with the .lnk 203 // file to be updated. For best results pass the filename with the .lnk
204 // extension. 204 // extension.
205 bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination, 205 bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination,
206 const wchar_t *working_dir, const wchar_t *arguments, 206 const wchar_t *working_dir, const wchar_t *arguments,
207 const wchar_t *description, const wchar_t *icon, 207 const wchar_t *description, const wchar_t *icon,
208 int icon_index); 208 int icon_index);
209
210 // Return true if the given directory is empty
211 bool IsDirectoryEmpty(const std::wstring& dir_path);
212
209 #endif 213 #endif
210 214
211 215
212 // Get the temporary directory provided by the system. 216 // Get the temporary directory provided by the system.
213 bool GetTempDir(std::wstring* path); 217 bool GetTempDir(std::wstring* path);
214 218
215 // Creates a temporary file. The full path is placed in 'temp_file', and the 219 // Creates a temporary file. The full path is placed in 'temp_file', and the
216 // function returns true if was successful in creating the file. The file will 220 // function returns true if was successful in creating the file. The file will
217 // be empty and all handles closed after this function returns. 221 // be empty and all handles closed after this function returns.
218 // TODO(erikkay): rename this function and track down all of the callers. 222 // TODO(erikkay): rename this function and track down all of the callers.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 335
332 // Renames a file using the MoveFileEx API and ensures that the target file gets 336 // Renames a file using the MoveFileEx API and ensures that the target file gets
333 // the correct security descriptor in the new path. 337 // the correct security descriptor in the new path.
334 bool RenameFileAndResetSecurityDescriptor( 338 bool RenameFileAndResetSecurityDescriptor(
335 const std::wstring& source_file_path, 339 const std::wstring& source_file_path,
336 const std::wstring& target_file_path); 340 const std::wstring& target_file_path);
337 341
338 } // namespace file_util 342 } // namespace file_util
339 343
340 #endif // BASE_FILE_UTIL_H_ 344 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698