Update contents.rst

This commit is contained in:
Vidar Tonaas Fauske 2019-10-31 10:26:06 +00:00 committed by GitHub
parent 5280bf60a5
commit 2249fba51b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,9 +100,10 @@ model. There are three model types: **notebook**, **file**, and **directory**.
.. _contentfree:
In certain circumstances, we don't need the full content of an entity to
complete a Contents API request. In such cases, we omit the ``content``, and
``format`` keys from the model, and the default values for the ``mimetype``
field (see above). This most commonly occurs when listing a directory, in
complete a Contents API request. In such cases, we omit the ``content``, and
``format`` keys from the model. The default values for the ``mimetype``
field will might also not be evaluated, in which case it will be set as `None`.
This reduced reply most commonly occurs when listing a directory, in
which circumstance we represent files within the directory as content-less
models to avoid having to recursively traverse and serialize the entire
filesystem.