| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // We're trying to transition away from paths as wstrings into using | |
| 6 // FilePath objects. This file contains declarations of deprecated | |
| 7 // functions. By hiding them here rather in the main header, we hope | |
| 8 // to discourage callers. | |
| 9 | |
| 10 // See file_util.h for documentation on all functions that don't have | |
| 11 // documentation here. | |
| 12 | |
| 13 #ifndef BASE_FILE_UTIL_DEPRECATED_H_ | |
| 14 #define BASE_FILE_UTIL_DEPRECATED_H_ | |
| 15 #pragma once | |
| 16 | |
| 17 #include "base/base_export.h" | |
| 18 #include "build/build_config.h" | |
| 19 | |
| 20 // We've successfully deprecated all of these functions on non-Windows | |
| 21 // platforms. | |
| 22 | |
| 23 #if !defined(OS_WIN) | |
| 24 #error Do not include on non-Windows platforms. | |
| 25 #endif | |
| 26 | |
| 27 namespace file_util { | |
| 28 | |
| 29 // Use the FilePath versions instead. | |
| 30 BASE_EXPORT FILE* OpenFile(const std::string& filename, const char* mode); | |
| 31 BASE_EXPORT FILE* OpenFile(const std::wstring& filename, const char* mode); | |
| 32 | |
| 33 // Use version that takes a FilePath. | |
| 34 BASE_EXPORT int ReadFile(const std::wstring& filename, char* data, int size); | |
| 35 BASE_EXPORT int WriteFile(const std::wstring& filename, | |
| 36 const char* data, int size); | |
| 37 | |
| 38 } // namespace file_util | |
| 39 | |
| 40 #endif // BASE_FILE_UTIL_DEPRECATED_H_ | |
| OLD | NEW |