shell
This commit is contained in:
@@ -73,11 +73,9 @@ namespace mongo {
|
||||
BSONObj encapsulate( const BSONObj &obj ) {
|
||||
return BSON( "" << obj );
|
||||
}
|
||||
|
||||
|
||||
// real methods
|
||||
|
||||
|
||||
mongo::BSONObj JSSleep(const mongo::BSONObj &args){
|
||||
assert( args.nFields() == 1 );
|
||||
assert( args.firstElement().isNumber() );
|
||||
@@ -181,6 +179,10 @@ namespace mongo {
|
||||
return BSON( "" << p.string() );
|
||||
}
|
||||
|
||||
BSONObj hostname(const BSONObj&) {
|
||||
return BSON( "" << getHostName() );
|
||||
}
|
||||
|
||||
BSONObj removeFile(const BSONObj& args){
|
||||
uassert( 12597 , "need to specify 1 argument" , args.nFields() == 1 );
|
||||
|
||||
@@ -719,6 +721,7 @@ namespace mongo {
|
||||
scope.injectNative( "listFiles" , listFiles );
|
||||
scope.injectNative( "ls" , ls );
|
||||
scope.injectNative( "pwd", pwd );
|
||||
scope.injectNative( "hostname", hostname);
|
||||
scope.injectNative( "resetDbpath", ResetDbpath );
|
||||
scope.injectNative( "copyDbpath", CopyDbpath );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user