Chromium Code Reviews| 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 26 matching lines...) Expand all Loading... | |
| 37 // non-period/non-delimiter characters, and basename is non-empty. | 37 // non-period/non-delimiter characters, and basename is non-empty. |
| 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&); | |
|
kwiberg-webrtc
2016/04/19 09:21:02
It's more efficient to move than to copy std::stri
| |
| 47 Pathname(const std::string& pathname); | 48 Pathname(const std::string& pathname); |
| 48 Pathname(const std::string& folder, const std::string& filename); | 49 Pathname(const std::string& folder, const std::string& filename); |
| 49 | 50 |
| 50 // Set's the default folder delimiter for this Pathname | 51 // Set's the default folder delimiter for this Pathname |
| 51 char folder_delimiter() const { return folder_delimiter_; } | 52 char folder_delimiter() const { return folder_delimiter_; } |
| 52 void SetFolderDelimiter(char delimiter); | 53 void SetFolderDelimiter(char delimiter); |
| 53 | 54 |
| 54 // Normalize changes all folder delimiters to folder_delimiter() | 55 // Normalize changes all folder delimiters to folder_delimiter() |
| 55 void Normalize(); | 56 void Normalize(); |
| 56 | 57 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 return false; | 157 return false; |
| 157 } | 158 } |
| 158 return Filesystem::DeleteFolderContents(path); | 159 return Filesystem::DeleteFolderContents(path); |
| 159 } | 160 } |
| 160 | 161 |
| 161 /////////////////////////////////////////////////////////////////////////////// | 162 /////////////////////////////////////////////////////////////////////////////// |
| 162 | 163 |
| 163 } // namespace rtc | 164 } // namespace rtc |
| 164 | 165 |
| 165 #endif // WEBRTC_BASE_PATHUTILS_H__ | 166 #endif // WEBRTC_BASE_PATHUTILS_H__ |
| OLD | NEW |