There is a difference at this moment. However, there is no way to create an empty directory from nothing. It can only exist if all of its children are deleted. I like your suggestion. That would imply that a directory is automatically deleted when it becomes empty. This goes back to the original resourcestore API though, not just the rest.

According to the current API, listing children won't make a difference between an empty or non-existing directory (both will return an empty list). However it won't be possible to write a resource to the path of an empty directory and getType() will result DIRECTORY instead of UNDEFINED.

This is something for a separate proposal to change resourcestore...

Regards
Niels

On 14-01-16 00:56, Torben Barsballe wrote:
I agree with the general consensus that a single resource/endpoint should be sufficient

One implementation query: Is there any distinction between an empty directory and a directory that does not exist? (If so, why?). If we are aiming for something that is ostensibly implementation-agnostic, I can't see any compelling reasons for empty directories to exist, especially given that a POST will create any required directories on-the-fly. This approach would somewhat simplify navigation (since every listably directory is now guaranteed to terminate in a resource), but may be somewhat dependant on the underlying ResourceStore implementation (which I have not looked too thorougly into).

Torben


On Wed, Jan 13, 2016 at 3:01 PM, Robert Coup <[email protected] <mailto:[email protected]>> wrote:

    On 13 January 2016 at 22:48, Jody Garnett <[email protected]
    <mailto:[email protected]>> wrote:

        Agreed, I see the limitations - what do you think of Kevin's
        idea of using a query string and avoid a parallel tree for
        metadata?


    Isn't that what HEAD requests are for? And return the metadata in
    headers?

    HEAD /resource/path/to/directory
    > Last-Modified: <timestamp>
    > Content-Type: application/x-directory

    HEAD /resource/path/to/directory/file.png
    > ETag: <md5 hash>
    > Content-Length: 12345
    > Last-Modified: <timestamp>
    > Content-Type: image/png

    Rob :)

    
------------------------------------------------------------------------------
    Site24x7 APM Insight: Get Deep Visibility into Application Performance
    APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
    Monitor end-to-end web transactions and take corrective actions now
    Troubleshoot faster and improve end-user experience. Signup Now!
    http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
    _______________________________________________
    Geoserver-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/geoserver-devel




------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140


_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to