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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Normalize changes all folder delimiters to folder_delimiter() | 59 // Normalize changes all folder delimiters to folder_delimiter() |
60 void Normalize(); | 60 void Normalize(); |
61 | 61 |
62 // Reset to the empty pathname | 62 // Reset to the empty pathname |
63 void clear(); | 63 void clear(); |
64 | 64 |
65 // Returns true if the pathname is empty. Note: this->pathname().empty() | 65 // Returns true if the pathname is empty. Note: this->pathname().empty() |
66 // is always false. | 66 // is always false. |
67 bool empty() const; | 67 bool empty() const; |
68 | 68 |
69 std::string url() const; | |
70 | |
71 // Returns the folder and filename components. If the pathname is empty, | 69 // Returns the folder and filename components. If the pathname is empty, |
72 // returns a string representing the current directory (as a relative path, | 70 // returns a string representing the current directory (as a relative path, |
73 // i.e., "."). | 71 // i.e., "."). |
74 std::string pathname() const; | 72 std::string pathname() const; |
75 void SetPathname(const std::string& pathname); | 73 void SetPathname(const std::string& pathname); |
76 void SetPathname(const std::string& folder, const std::string& filename); | 74 void SetPathname(const std::string& folder, const std::string& filename); |
77 | 75 |
78 // Append pathname to the current folder (if any). Any existing filename | 76 // Append pathname to the current folder (if any). Any existing filename |
79 // will be discarded. | 77 // will be discarded. |
80 void AppendPathname(const std::string& pathname); | 78 void AppendPathname(const std::string& pathname); |
(...skipping 23 matching lines...) Expand all Loading... |
104 #endif | 102 #endif |
105 | 103 |
106 private: | 104 private: |
107 std::string folder_, basename_, extension_; | 105 std::string folder_, basename_, extension_; |
108 char folder_delimiter_; | 106 char folder_delimiter_; |
109 }; | 107 }; |
110 | 108 |
111 } // namespace rtc | 109 } // namespace rtc |
112 | 110 |
113 #endif // WEBRTC_BASE_PATHUTILS_H__ | 111 #endif // WEBRTC_BASE_PATHUTILS_H__ |
OLD | NEW |