| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 bool CreateFolder(const Pathname& pathname) override; | 58 bool CreateFolder(const Pathname& pathname) override; |
| 59 | 59 |
| 60 // This moves a file from old_path to new_path, where "file" can be a plain | 60 // This moves a file from old_path to new_path, where "file" can be a plain |
| 61 // file or directory, which will be moved recursively. | 61 // file or directory, which will be moved recursively. |
| 62 // Returns true if function succeeds. | 62 // Returns true if function succeeds. |
| 63 bool MoveFile(const Pathname& old_path, const Pathname& new_path) override; | 63 bool MoveFile(const Pathname& old_path, const Pathname& new_path) override; |
| 64 | 64 |
| 65 // Returns true if a pathname is a directory | 65 // Returns true if a pathname is a directory |
| 66 bool IsFolder(const Pathname& pathname) override; | 66 bool IsFolder(const Pathname& pathname) override; |
| 67 | 67 |
| 68 // Returns true if pathname represents a temporary location on the system. | |
| 69 bool IsTemporaryPath(const Pathname& pathname) override; | |
| 70 | |
| 71 // Returns true of pathname represents an existing file | 68 // Returns true of pathname represents an existing file |
| 72 bool IsFile(const Pathname& pathname) override; | 69 bool IsFile(const Pathname& pathname) override; |
| 73 | 70 |
| 74 // Returns true if pathname refers to no filesystem object, every parent | 71 // Returns true if pathname refers to no filesystem object, every parent |
| 75 // directory either exists, or is also absent. | 72 // directory either exists, or is also absent. |
| 76 bool IsAbsent(const Pathname& pathname) override; | 73 bool IsAbsent(const Pathname& pathname) override; |
| 77 | 74 |
| 78 std::string TempFilename(const Pathname& dir, | 75 std::string TempFilename(const Pathname& dir, |
| 79 const std::string& prefix) override; | 76 const std::string& prefix) override; |
| 80 | 77 |
| 81 // A folder appropriate for storing temporary files (Contents are | 78 // A folder appropriate for storing temporary files (Contents are |
| 82 // automatically deleted when the program exists) | 79 // automatically deleted when the program exists) |
| 83 bool GetTemporaryFolder(Pathname& path, | 80 bool GetTemporaryFolder(Pathname& path, |
| 84 bool create, | 81 bool create, |
| 85 const std::string* append) override; | 82 const std::string* append) override; |
| 86 | 83 |
| 87 bool GetFileSize(const Pathname& path, size_t* size) override; | 84 bool GetFileSize(const Pathname& path, size_t* size) override; |
| 88 bool GetFileTime(const Pathname& path, | 85 bool GetFileTime(const Pathname& path, |
| 89 FileTimeType which, | 86 FileTimeType which, |
| 90 time_t* time) override; | 87 time_t* time) override; |
| 91 | 88 |
| 92 // Get a temporary folder that is unique to the current user and application. | |
| 93 bool GetAppTempFolder(Pathname* path) override; | |
| 94 | |
| 95 private: | 89 private: |
| 96 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) | 90 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) |
| 97 static char* provided_app_data_folder_; | 91 static char* provided_app_data_folder_; |
| 98 static char* provided_app_temp_folder_; | 92 static char* provided_app_temp_folder_; |
| 99 #else | 93 #else |
| 100 static char* app_temp_path_; | 94 static char* app_temp_path_; |
| 101 #endif | 95 #endif |
| 102 | 96 |
| 103 static char* CopyString(const std::string& str); | 97 static char* CopyString(const std::string& str); |
| 104 }; | 98 }; |
| 105 | 99 |
| 106 } // namespace rtc | 100 } // namespace rtc |
| 107 | 101 |
| 108 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ | 102 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ |
| OLD | NEW |