| 213 | |
| 214 | |
| 215 | string getVolumePath( |
| 216 | const string& rootDir, |
| 217 | const string& type, |
| 218 | const string& name, |
| 219 | const string& volumeId) |
| 220 | { |
| 221 | // Volume ID is percent-encoded to avoid invalid characters in the path. |
| 222 | return path::join(rootDir, type, name, VOLUMES_DIR, http::encode(volumeId)); |
| 223 | } |
| 224 | |
| 225 | |
| 226 | Try<VolumePath> parseVolumePath(const string& rootDir, const string& dir) |