| 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 27 matching lines...) Expand all Loading... |
| 38 /////////////////////////////////////////////////////////////////////////////// | 38 /////////////////////////////////////////////////////////////////////////////// |
| 39 | 39 |
| 40 class Pathname { | 40 class Pathname { |
| 41 public: | 41 public: |
| 42 // Folder delimiters are slash and backslash | 42 // Folder delimiters are slash and backslash |
| 43 static bool IsFolderDelimiter(char ch); | 43 static bool IsFolderDelimiter(char ch); |
| 44 static char DefaultFolderDelimiter(); | 44 static char DefaultFolderDelimiter(); |
| 45 | 45 |
| 46 Pathname(); | 46 Pathname(); |
| 47 Pathname(const Pathname&); | 47 Pathname(const Pathname&); |
| 48 Pathname(Pathname&&); |
| 48 Pathname(const std::string& pathname); | 49 Pathname(const std::string& pathname); |
| 49 Pathname(const std::string& folder, const std::string& filename); | 50 Pathname(const std::string& folder, const std::string& filename); |
| 50 | 51 |
| 52 Pathname& operator=(const Pathname&); |
| 53 Pathname& operator=(Pathname&&); |
| 54 |
| 51 // Set's the default folder delimiter for this Pathname | 55 // Set's the default folder delimiter for this Pathname |
| 52 char folder_delimiter() const { return folder_delimiter_; } | 56 char folder_delimiter() const { return folder_delimiter_; } |
| 53 void SetFolderDelimiter(char delimiter); | 57 void SetFolderDelimiter(char delimiter); |
| 54 | 58 |
| 55 // Normalize changes all folder delimiters to folder_delimiter() | 59 // Normalize changes all folder delimiters to folder_delimiter() |
| 56 void Normalize(); | 60 void Normalize(); |
| 57 | 61 |
| 58 // Reset to the empty pathname | 62 // Reset to the empty pathname |
| 59 void clear(); | 63 void clear(); |
| 60 | 64 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 return false; | 161 return false; |
| 158 } | 162 } |
| 159 return Filesystem::DeleteFolderContents(path); | 163 return Filesystem::DeleteFolderContents(path); |
| 160 } | 164 } |
| 161 | 165 |
| 162 /////////////////////////////////////////////////////////////////////////////// | 166 /////////////////////////////////////////////////////////////////////////////// |
| 163 | 167 |
| 164 } // namespace rtc | 168 } // namespace rtc |
| 165 | 169 |
| 166 #endif // WEBRTC_BASE_PATHUTILS_H__ | 170 #endif // WEBRTC_BASE_PATHUTILS_H__ |
| OLD | NEW |