| 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 16 matching lines...) Expand all Loading... |
| 27 // folders. That needs to be passed into this class from Java. Similarly, iOS | 27 // folders. That needs to be passed into this class from Java. Similarly, iOS |
| 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. | |
| 38 // Otherwise, returns null. | |
| 39 FileStream* OpenFile(const Pathname& filename, | |
| 40 const std::string& mode) override; | |
| 41 | |
| 42 // This will attempt to delete the file located at filename. | 37 // 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. | 38 // It will fail with VERIY if you pass it a non-existant file, or a directory. |
| 44 bool DeleteFile(const Pathname& filename) override; | 39 bool DeleteFile(const Pathname& filename) override; |
| 45 | 40 |
| 46 // This will attempt to delete the folder located at 'folder' | 41 // 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 | 42 // It DCHECKs and returns false if you pass it a non-existant folder or a |
| 48 // plain file. | 43 // plain file. |
| 49 bool DeleteEmptyFolder(const Pathname& folder) override; | 44 bool DeleteEmptyFolder(const Pathname& folder) override; |
| 50 | 45 |
| 51 // Creates a directory. This will call itself recursively to create /foo/bar | 46 // Creates a directory. This will call itself recursively to create /foo/bar |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #else | 88 #else |
| 94 static char* app_temp_path_; | 89 static char* app_temp_path_; |
| 95 #endif | 90 #endif |
| 96 | 91 |
| 97 static char* CopyString(const std::string& str); | 92 static char* CopyString(const std::string& str); |
| 98 }; | 93 }; |
| 99 | 94 |
| 100 } // namespace rtc | 95 } // namespace rtc |
| 101 | 96 |
| 102 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ | 97 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ |
| OLD | NEW |