This version of the documentation is archived and no longer
supported. View the current documentation to learn how to
upgrade your version of MongoDB.
listFiles()Returns an array, containing one document per object in the directory. This function operates in the context of the
mongoshell. The fields included in the documents are:nameA string which contains the pathname of the object.
baseNameA string which contains the name of the object.
isDirectoryA boolean to indicate whether the object is a directory.
sizeThe size of the object in bytes. This field is only present for files.