[go: up one dir, main page]

Menu

[r19]: / client / ls.cpp  Maximize  Restore  History

Download this file

26 lines (17 with data), 545 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <algorithm>
#include <fsclient.h>
using namespace std;
bool operator<(const CIndexInfo& a, const CIndexInfo& b) {
return a.m_llTimeStamp < b.m_llTimeStamp;
}
int main(int argc, char** argv)
{
CFSClient fsclient;
fsclient.connect(argv[1], atoi(argv[2]));
vector<CIndexInfo> filelist;
fsclient.ls(filelist);
sort(filelist.begin(), filelist.end());
for (vector<CIndexInfo>::iterator i = filelist.begin(); i != filelist.end(); ++ i)
cout << i->m_pcName << " " << i->m_llTimeStamp << endl;
return 1;
}