summaryrefslogtreecommitdiff
path: root/tools/files.cpp
diff options
context:
space:
mode:
authorMike Dirolf <mike@10gen.com>2009-09-01 15:53:31 -0400
committerMike Dirolf <mike@10gen.com>2009-09-01 15:53:31 -0400
commit0bbc36fae38cfb77b2de3ced4615e91bc7d564ae (patch)
treeb48a3bdd4fd8e4b84262768d75e389c4b0d6c135 /tools/files.cpp
parentfd2a19c1bc9003a5bd7663f5e790316d9d50d6fa (diff)
downloadmongo-0bbc36fae38cfb77b2de3ced4615e91bc7d564ae.tar.gz
minor: more whitespace
Diffstat (limited to 'tools/files.cpp')
-rw-r--r--tools/files.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/files.cpp b/tools/files.cpp
index 2a53b02d107..705ea2977c2 100644
--- a/tools/files.cpp
+++ b/tools/files.cpp
@@ -46,25 +46,25 @@ public:
out << "\t list - list all files. takes an optional filename. the file has to start with the filename" << endl;
out << "\t search - search all files for something that contains the string" << endl;
}
-
+
void display( GridFS * grid , BSONObj obj ){
auto_ptr<DBClientCursor> c = grid->list( obj );
while ( c->more() ){
BSONObj obj = c->next();
- cout
- << obj["filename"].str() << "\t"
- << (long)obj["length"].number()
+ cout
+ << obj["filename"].str() << "\t"
+ << (long)obj["length"].number()
<< endl;
}
}
-
+
int run(){
string cmd = getParam( "command" );
if ( cmd.size() == 0 ){
cerr << "need command" << endl;
return -1;
}
-
+
GridFS g( conn() , _db );
auth();
@@ -102,13 +102,13 @@ public:
cout << "done write to: " << out << endl;
return 0;
}
-
+
if ( cmd == "put" ){
cout << "file object: " << g.storeFile( filename ) << endl;
cout << "done!";
return 0;
}
-
+
cerr << "unknown command: " << cmd << endl;
return -1;
}