Docs Menu
Docs Home
/
MongoDB Manual
/ /

Native Methods

Note

For details on a specific method, including syntax and examples, click on the link to the method's reference page.

Name
Description
cat()
Returns the contents of the specified file.
Changes the current working directory to the specified path.
Copies a local dbPath. For internal use.
Returns the hostname of the system running the mongo shell.
Returns a document that reports the amount of memory used by the shell.
Returns the hostname of the system running the shell.
Returns a boolean indicating whether the mongo shell is running in interactive or script mode.
Returns an array of documents that give the name and size of each object in the directory.
Loads and runs a JavaScript file in the shell.
Returns a list of the files in the current directory.
The md5 hash of the specified file.
Creates a directory at the specified path.
Returns the current directory.
Exits the current shell session.
Removes the specified file from the local file system.
Removes a local dbPath. For internal use.
Suspends the mongo shell for a given period of time.
Configures the mongo shell to report operation timing.
Returns the current version of the mongo shell instance.
Returns true if the shell runs on a Windows system; false if a Unix or Linux system.
Returns a random number between 0 and 1.

Back

SessionOptions