The native method listed here is for the legacy
To use native methods in
Native Methods in
Returns an array, containing one document per object in the directory. This function operates in the context of
mongosh. The fields included in the documents are:
A string which contains the pathname of the object.
A string which contains the name of the object.
A boolean to indicate whether the object is a directory.
The size of the object in bytes. This field is only present for files.