| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // static | 54 // static |
| 55 File File::Create(Pathname&& path) { | 55 File File::Create(Pathname&& path) { |
| 56 return Create(NormalizePathname(std::move(path))); | 56 return Create(NormalizePathname(std::move(path))); |
| 57 } | 57 } |
| 58 | 58 |
| 59 // static | 59 // static |
| 60 File File::Create(const Pathname& path) { | 60 File File::Create(const Pathname& path) { |
| 61 return Create(Pathname(path)); | 61 return Create(Pathname(path)); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // static |
| 65 bool File::Remove(const std::string& path) { |
| 66 return RemoveFile(path); |
| 67 } |
| 68 |
| 69 // static |
| 70 bool File::Remove(Pathname&& path) { |
| 71 return Remove(NormalizePathname(std::move(path))); |
| 72 } |
| 73 |
| 74 // static |
| 75 bool File::Remove(const Pathname& path) { |
| 76 return Remove(Pathname(path)); |
| 77 } |
| 78 |
| 64 File::File(File&& other) : file_(other.file_) { | 79 File::File(File&& other) : file_(other.file_) { |
| 65 other.file_ = kInvalidPlatformFileValue; | 80 other.file_ = kInvalidPlatformFileValue; |
| 66 } | 81 } |
| 67 | 82 |
| 68 File& File::operator=(File&& other) { | 83 File& File::operator=(File&& other) { |
| 69 Close(); | 84 Close(); |
| 70 file_ = other.file_; | 85 file_ = other.file_; |
| 71 other.file_ = kInvalidPlatformFileValue; | 86 other.file_ = kInvalidPlatformFileValue; |
| 72 return *this; | 87 return *this; |
| 73 } | 88 } |
| 74 | 89 |
| 75 bool File::IsOpen() { | 90 bool File::IsOpen() { |
| 76 return file_ != kInvalidPlatformFileValue; | 91 return file_ != kInvalidPlatformFileValue; |
| 77 } | 92 } |
| 78 | 93 |
| 79 } // namespace rtc | 94 } // namespace rtc |
| OLD | NEW |