| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 120 } |
| 121 | 121 |
| 122 bool UnixFilesystem::CreateFolder(const Pathname &path) { | 122 bool UnixFilesystem::CreateFolder(const Pathname &path) { |
| 123 return CreateFolder(path, 0755); | 123 return CreateFolder(path, 0755); |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool UnixFilesystem::DeleteFile(const Pathname &filename) { | 126 bool UnixFilesystem::DeleteFile(const Pathname &filename) { |
| 127 LOG(LS_INFO) << "Deleting file:" << filename.pathname(); | 127 LOG(LS_INFO) << "Deleting file:" << filename.pathname(); |
| 128 | 128 |
| 129 if (!IsFile(filename)) { | 129 if (!IsFile(filename)) { |
| 130 RTC_DCHECK(IsFile(filename)); | |
| 131 return false; | 130 return false; |
| 132 } | 131 } |
| 133 return ::unlink(filename.pathname().c_str()) == 0; | 132 return ::unlink(filename.pathname().c_str()) == 0; |
| 134 } | 133 } |
| 135 | 134 |
| 136 bool UnixFilesystem::GetTemporaryFolder(Pathname &pathname, bool create, | 135 bool UnixFilesystem::GetTemporaryFolder(Pathname &pathname, bool create, |
| 137 const std::string *append) { | 136 const std::string *append) { |
| 138 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) | 137 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC) |
| 139 RTC_DCHECK(provided_app_temp_folder_ != nullptr); | 138 RTC_DCHECK(provided_app_temp_folder_ != nullptr); |
| 140 pathname.SetPathname(provided_app_temp_folder_, ""); | 139 pathname.SetPathname(provided_app_temp_folder_, ""); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 231 |
| 233 } // namespace rtc | 232 } // namespace rtc |
| 234 | 233 |
| 235 #if defined(__native_client__) | 234 #if defined(__native_client__) |
| 236 extern "C" int __attribute__((weak)) | 235 extern "C" int __attribute__((weak)) |
| 237 link(const char* oldpath, const char* newpath) { | 236 link(const char* oldpath, const char* newpath) { |
| 238 errno = EACCES; | 237 errno = EACCES; |
| 239 return -1; | 238 return -1; |
| 240 } | 239 } |
| 241 #endif | 240 #endif |
| OLD | NEW |