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

Side by Side Diff: base/file_util_deprecated.h

Issue 6733031: Base: A few more files using BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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.h ('k') | base/file_version_info.h » ('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) 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
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 "base/base_api.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
18 19
19 // We've successfully deprecated all of these functions on non-Windows 20 // We've successfully deprecated all of these functions on non-Windows
20 // platforms. 21 // platforms.
21 22
22 #if defined(OS_WIN) 23 #if defined(OS_WIN)
23 24
24 namespace file_util { 25 namespace file_util {
25 26
26 // Use the FilePath versions instead. 27 // Use the FilePath versions instead.
27 FILE* OpenFile(const std::string& filename, const char* mode); 28 BASE_API FILE* OpenFile(const std::string& filename, const char* mode);
28 FILE* OpenFile(const std::wstring& filename, const char* mode); 29 BASE_API FILE* OpenFile(const std::wstring& filename, const char* mode);
29 30
30 // 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.
31 void AppendToPath(std::wstring* path, const std::wstring& new_ending); 32 BASE_API void AppendToPath(std::wstring* path, const std::wstring& new_ending);
32 33
33 // Use FilePath::Extension instead. 34 // Use FilePath::Extension instead.
34 FilePath::StringType GetFileExtensionFromPath(const FilePath& path); 35 BASE_API FilePath::StringType GetFileExtensionFromPath(const FilePath& path);
35 std::wstring GetFileExtensionFromPath(const std::wstring& path); 36 BASE_API std::wstring GetFileExtensionFromPath(const std::wstring& path);
36 37
37 // Use version that takes a FilePath. 38 // Use version that takes a FilePath.
38 bool Delete(const std::wstring& path, bool recursive); 39 BASE_API bool Delete(const std::wstring& path, bool recursive);
39 bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path, 40 BASE_API bool CopyDirectory(const std::wstring& from_path,
40 bool recursive); 41 const std::wstring& to_path,
41 int ReadFile(const std::wstring& filename, char* data, int size); 42 bool recursive);
42 int WriteFile(const std::wstring& filename, const char* data, int size); 43 BASE_API int ReadFile(const std::wstring& filename, char* data, int size);
44 BASE_API int WriteFile(const std::wstring& filename,
45 const char* data, int size);
43 46
44 } 47 }
45 48
46 #endif // OS_WIN 49 #endif // OS_WIN
47 50
48 #endif // BASE_FILE_UTIL_DEPRECATED_H_ 51 #endif // BASE_FILE_UTIL_DEPRECATED_H_
OLDNEW
« no previous file with comments | « base/file_util.h ('k') | base/file_version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698