OLD | NEW |
---|---|
1 // Copyright (c) 2011 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 |
(...skipping 14 matching lines...) Expand all Loading... | |
25 namespace file_util { | 25 namespace file_util { |
26 | 26 |
27 // Use the FilePath versions instead. | 27 // Use the FilePath versions instead. |
28 BASE_API FILE* OpenFile(const std::string& filename, const char* mode); | 28 BASE_API FILE* OpenFile(const std::string& filename, const char* mode); |
29 BASE_API FILE* OpenFile(const std::wstring& filename, const char* mode); | 29 BASE_API FILE* OpenFile(const std::wstring& filename, const char* mode); |
30 | 30 |
31 // Appends new_ending to path, adding a separator between the two if necessary. | 31 // Appends new_ending to path, adding a separator between the two if necessary. |
32 BASE_API void AppendToPath(std::wstring* path, const std::wstring& new_ending); | 32 BASE_API void AppendToPath(std::wstring* path, const std::wstring& new_ending); |
33 | 33 |
34 // Use FilePath::Extension instead. | 34 // Use FilePath::Extension instead. |
35 BASE_API FilePath::StringType GetFileExtensionFromPath(const FilePath& path); | |
36 BASE_API std::wstring GetFileExtensionFromPath(const std::wstring& path); | 35 BASE_API std::wstring GetFileExtensionFromPath(const std::wstring& path); |
tfarina
2011/08/04 18:55:07
There are more just two uses of this function in s
| |
37 | 36 |
38 // Use version that takes a FilePath. | 37 // Use version that takes a FilePath. |
39 BASE_API bool Delete(const std::wstring& path, bool recursive); | 38 BASE_API bool Delete(const std::wstring& path, bool recursive); |
40 BASE_API bool CopyDirectory(const std::wstring& from_path, | 39 BASE_API bool CopyDirectory(const std::wstring& from_path, |
41 const std::wstring& to_path, | 40 const std::wstring& to_path, |
42 bool recursive); | 41 bool recursive); |
43 BASE_API int ReadFile(const std::wstring& filename, char* data, int size); | 42 BASE_API int ReadFile(const std::wstring& filename, char* data, int size); |
44 BASE_API int WriteFile(const std::wstring& filename, | 43 BASE_API int WriteFile(const std::wstring& filename, |
45 const char* data, int size); | 44 const char* data, int size); |
46 | 45 |
47 } | 46 } |
48 | 47 |
49 #endif // OS_WIN | 48 #endif // OS_WIN |
50 | 49 |
51 #endif // BASE_FILE_UTIL_DEPRECATED_H_ | 50 #endif // BASE_FILE_UTIL_DEPRECATED_H_ |
OLD | NEW |