Code Review
/
stor4nfv.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
initial code repo
[stor4nfv.git]
/
src
/
ceph
/
src
/
test
/
old
/
testfilepath.cc
1
2
#include "include/filepath.h"
3
#include <iostream>
4
using namespace std;
5
6
int print(string s) {
7
filepath fp = s;
8
cout << "s = " << s << " filepath = " << fp << endl;
9
cout << " depth " << fp.depth() << endl;
10
for (int i=0; i<fp.depth(); i++) {
11
cout << "\t" << i << " " << fp[i] << endl;
12
}
13
}
14
15
int main() {
16
filepath p;
17
print("/home/sage");
18
print("a/b/c");
19
print("/a/b/c");
20
print("/a/b/c/");
21
print("/a/b/../d");
22
}