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

Side by Side Diff: base/file_util.h

Issue 2001013: Use realpath() to find the path to the extension unpack dir on posix systems. (Closed)
Patch Set: Created 10 years, 7 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
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 // Returns the file size. Returns true on success. 273 // Returns the file size. Returns true on success.
274 bool GetFileSize(const FilePath& file_path, int64* file_size); 274 bool GetFileSize(const FilePath& file_path, int64* file_size);
275 275
276 // Returns true if the given path's base name is ".". 276 // Returns true if the given path's base name is ".".
277 bool IsDot(const FilePath& path); 277 bool IsDot(const FilePath& path);
278 278
279 // Returns true if the given path's base name is "..". 279 // Returns true if the given path's base name is "..".
280 bool IsDotDot(const FilePath& path); 280 bool IsDotDot(const FilePath& path);
281 281
282 #if defined(OS_POSIX)
283 // Set |real_path| to |path| with symbolic links expanded.
284 // Windows support (expanding junctions) comming soon:
285 // http://crbug.com/13044
286 bool RealPath(const FilePath& path, FilePath* real_path);
287 #endif
288
282 // Used to hold information about a given file path. See GetFileInfo below. 289 // Used to hold information about a given file path. See GetFileInfo below.
283 struct FileInfo { 290 struct FileInfo {
284 // The size of the file in bytes. Undefined when is_directory is true. 291 // The size of the file in bytes. Undefined when is_directory is true.
285 int64 size; 292 int64 size;
286 293
287 // True if the file corresponds to a directory. 294 // True if the file corresponds to a directory.
288 bool is_directory; 295 bool is_directory;
289 296
290 // The last modified time of a file. 297 // The last modified time of a file.
291 base::Time last_modified; 298 base::Time last_modified;
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 576
570 #endif // UNIT_TEST 577 #endif // UNIT_TEST
571 578
572 } // namespace file_util 579 } // namespace file_util
573 580
574 // Deprecated functions have been moved to this separate header file, 581 // Deprecated functions have been moved to this separate header file,
575 // which must be included last after all the above definitions. 582 // which must be included last after all the above definitions.
576 #include "base/file_util_deprecated.h" 583 #include "base/file_util_deprecated.h"
577 584
578 #endif // BASE_FILE_UTIL_H_ 585 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698