From 32fd6f41f250de430fc4f45a421a5928e9c7c3f7 Mon Sep 17 00:00:00 2001 From: asettle Date: Wed, 27 Jan 2016 12:36:15 +1000 Subject: [PATCH] Fixing incorrect para about swift psuedo-directories This patch also adds JSON and XML examples Change-Id: I8815353b758dafe8d0784617600c0eaba2e316b4 Closes-bug: 1522509 --- ...seudo_hierarchical_folders_directories.rst | 58 +++++++++++++++++-- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/doc/user-guide/source/cli_swift_pseudo_hierarchical_folders_directories.rst b/doc/user-guide/source/cli_swift_pseudo_hierarchical_folders_directories.rst index 3a8d8e0dcc..8101d5a5fa 100644 --- a/doc/user-guide/source/cli_swift_pseudo_hierarchical_folders_directories.rst +++ b/doc/user-guide/source/cli_swift_pseudo_hierarchical_folders_directories.rst @@ -55,13 +55,61 @@ Use the delimiter parameter to limit the displayed results. To use The system returns status code 2xx (between 200 and 299, inclusive) and the requested matching objects. Because you use the slash, only the pseudo-directory ``photos/`` displays. The returned values from a slash -``delimiter`` query are not real objects. They have a content-type of -``application/directory`` and are in the ``subdir`` section of JSON and -XML results. +``delimiter`` query are not real objects. The value will refer to +a real object if it does not end with a slash. The pseudo-directories +have no content-type, rather, each pseudo-directory has +its own ``subdir`` entry in the response of JSON and XML results. +For example: -.. code-block:: console +.. code-block:: JSON - photos/ + [ + { + "subdir": "photos/" + } + ] + + [ + { + "subdir": "photos/animals/" + }, + { + "hash": "b249a153f8f38b51e92916bbc6ea57ad", + "last_modified": "2015-12-03T17:31:28.187370", + "bytes": 2906, + "name": "photos/me.jpg", + "content_type": "image/jpeg" + }, + { + "subdir": "photos/plants/" + } + ] + +.. code-block:: XML + + + + + photos/ + + + + + + + photos/animals/ + + + photos/me.jpg + b249a153f8f38b51e92916bbc6ea57ad + 2906 + image/jpeg + 2015-12-03T17:31:28.187370 + + + photos/plants/ + + Use the ``prefix`` and ``delimiter`` parameters to view the objects inside a pseudo-directory, including further nested pseudo-directories.