OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // only supports an Objective-C API for fetching the folder locations, so that | 28 // only supports an Objective-C API for fetching the folder locations, so that |
29 // needs to be passed in here from Objective-C. Or at least that used to be | 29 // needs to be passed in here from Objective-C. Or at least that used to be |
30 // the case; now the ctor will do the work if necessary and possible. | 30 // the case; now the ctor will do the work if necessary and possible. |
31 // TODO(fischman): add an Android version that uses JNI and drop the | 31 // TODO(fischman): add an Android version that uses JNI and drop the |
32 // SetApp*Folder() APIs once external users stop using them. | 32 // SetApp*Folder() APIs once external users stop using them. |
33 static void SetAppDataFolder(const std::string& folder); | 33 static void SetAppDataFolder(const std::string& folder); |
34 static void SetAppTempFolder(const std::string& folder); | 34 static void SetAppTempFolder(const std::string& folder); |
35 #endif | 35 #endif |
36 | 36 |
37 // Opens a file. Returns an open StreamInterface if function succeeds. | 37 // Opens a file. Returns an open StreamInterface if function succeeds. |
38 // Otherwise, returns NULL. | 38 // Otherwise, returns null. |
39 FileStream* OpenFile(const Pathname& filename, | 39 FileStream* OpenFile(const Pathname& filename, |
40 const std::string& mode) override; | 40 const std::string& mode) override; |
41 | 41 |
42 // This will attempt to delete the file located at filename. | 42 // This will attempt to delete the file located at filename. |
43 // It will fail with VERIY if you pass it a non-existant file, or a directory. | 43 // It will fail with VERIY if you pass it a non-existant file, or a directory. |
44 bool DeleteFile(const Pathname& filename) override; | 44 bool DeleteFile(const Pathname& filename) override; |
45 | 45 |
46 // This will attempt to delete the folder located at 'folder' | 46 // This will attempt to delete the folder located at 'folder' |
47 // It DCHECKs and returns false if you pass it a non-existant folder or a | 47 // It DCHECKs and returns false if you pass it a non-existant folder or a |
48 // plain file. | 48 // plain file. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 #else | 104 #else |
105 static char* app_temp_path_; | 105 static char* app_temp_path_; |
106 #endif | 106 #endif |
107 | 107 |
108 static char* CopyString(const std::string& str); | 108 static char* CopyString(const std::string& str); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace rtc | 111 } // namespace rtc |
112 | 112 |
113 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ | 113 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ |
OLD | NEW |