OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 #ifndef LIBRARIES_NACL_IO_PATH_H_ | 5 #ifndef LIBRARIES_NACL_IO_PATH_H_ |
6 #define LIBRARIES_NACL_IO_PATH_H_ | 6 #define LIBRARIES_NACL_IO_PATH_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "sdk_util/macros.h" | 11 #include "sdk_util/macros.h" |
12 | 12 |
| 13 namespace nacl_io { |
| 14 |
13 typedef std::vector<std::string> StringArray_t; | 15 typedef std::vector<std::string> StringArray_t; |
14 | 16 |
15 class Path { | 17 class Path { |
16 public: | 18 public: |
17 Path(); | 19 Path(); |
18 Path(const Path& path); | 20 Path(const Path& path); |
19 | 21 |
20 // This constructor splits path by '/' as a starting point for this Path. | 22 // This constructor splits path by '/' as a starting point for this Path. |
21 // If the path begins with the character '/', the path is considered | 23 // If the path begins with the character '/', the path is considered |
22 // to be absolute. | 24 // to be absolute. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 Path& operator=(const Path& p); | 61 Path& operator=(const Path& p); |
60 Path& operator=(const std::string& str); | 62 Path& operator=(const std::string& str); |
61 | 63 |
62 private: | 64 private: |
63 // Internal representation of the path stored an array of string representing | 65 // Internal representation of the path stored an array of string representing |
64 // the directory traversal. The first string is a "/" if this is an absolute | 66 // the directory traversal. The first string is a "/" if this is an absolute |
65 // path. | 67 // path. |
66 StringArray_t paths_; | 68 StringArray_t paths_; |
67 }; | 69 }; |
68 | 70 |
| 71 } // namespace nacl_io |
| 72 |
69 #endif // PACKAGES_LIBRARIES_NACL_IO_PATH_H_ | 73 #endif // PACKAGES_LIBRARIES_NACL_IO_PATH_H_ |
OLD | NEW |