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

Side by Side Diff: base/file_util_deprecated.h

Issue 6057010: base: Remove deprecated file_util::GetFilenameFromPath function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « base/file_util.cc ('k') | base/file_util_unittest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // We're trying to transition away from paths as wstrings into using 5 // We're trying to transition away from paths as wstrings into using
6 // FilePath objects. This file contains declarations of deprecated 6 // FilePath objects. This file contains declarations of deprecated
7 // functions. By hiding them here rather in the main header, we hope 7 // functions. By hiding them here rather in the main header, we hope
8 // to discourage callers. 8 // to discourage callers.
9 9
10 // See file_util.h for documentation on all functions that don't have 10 // See file_util.h for documentation on all functions that don't have
11 // documentation here. 11 // documentation here.
12 12
13 #ifndef BASE_FILE_UTIL_DEPRECATED_H_ 13 #ifndef BASE_FILE_UTIL_DEPRECATED_H_
14 #define BASE_FILE_UTIL_DEPRECATED_H_ 14 #define BASE_FILE_UTIL_DEPRECATED_H_
15 #pragma once 15 #pragma once
16 16
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 18
19 // We've successfully deprecated all of these functions on non-Windows 19 // We've successfully deprecated all of these functions on non-Windows
20 // platforms. 20 // platforms.
21 21
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 23
24 namespace file_util { 24 namespace file_util {
25 25
26 // Use the FilePath versions instead. 26 // Use the FilePath versions instead.
27 FILE* OpenFile(const std::string& filename, const char* mode); 27 FILE* OpenFile(const std::string& filename, const char* mode);
28 FILE* OpenFile(const std::wstring& filename, const char* mode); 28 FILE* OpenFile(const std::wstring& filename, const char* mode);
29 29
30 // Use FilePath::BaseName instead.
31 std::wstring GetFilenameFromPath(const std::wstring& path);
32
33 // Returns the directory component of a path, without the trailing 30 // Returns the directory component of a path, without the trailing
34 // path separator, or an empty string on error. The function does not 31 // path separator, or an empty string on error. The function does not
35 // check for the existence of the path, so if it is passed a directory 32 // check for the existence of the path, so if it is passed a directory
36 // without the trailing \, it will interpret the last component of the 33 // without the trailing \, it will interpret the last component of the
37 // path as a file and chomp it. This does not support relative paths. 34 // path as a file and chomp it. This does not support relative paths.
38 // Examples: 35 // Examples:
39 // path == "C:\pics\jojo.jpg", returns "C:\pics" 36 // path == "C:\pics\jojo.jpg", returns "C:\pics"
40 // path == "C:\Windows\system32\", returns "C:\Windows\system32" 37 // path == "C:\Windows\system32\", returns "C:\Windows\system32"
41 // path == "C:\Windows\system32", returns "C:\Windows" 38 // path == "C:\Windows\system32", returns "C:\Windows"
42 // Deprecated. Use FilePath's DirName() instead. 39 // Deprecated. Use FilePath's DirName() instead.
(...skipping 11 matching lines...) Expand all
54 bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path, 51 bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path,
55 bool recursive); 52 bool recursive);
56 int ReadFile(const std::wstring& filename, char* data, int size); 53 int ReadFile(const std::wstring& filename, char* data, int size);
57 int WriteFile(const std::wstring& filename, const char* data, int size); 54 int WriteFile(const std::wstring& filename, const char* data, int size);
58 55
59 } 56 }
60 57
61 #endif // OS_WIN 58 #endif // OS_WIN
62 59
63 #endif // BASE_FILE_UTIL_DEPRECATED_H_ 60 #endif // BASE_FILE_UTIL_DEPRECATED_H_
OLDNEW
« no previous file with comments | « base/file_util.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698