diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-09-15 13:15:47 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-09-15 13:18:21 -0400 |
commit | 269c6925ded8145aaea1f8ccdbb747f65f076131 (patch) | |
tree | 53baca2cb95215158d98e008614f4e7ab5e79e95 /doc/design/external_special_remote_protocol.mdwn | |
parent | 1890f6ee7a791db909055b4760919e6979ddd3ae (diff) |
implement removeExportDirectory
Not yet called by Command.Export.
WebDAV needs this to clean up empty collections. Also, example.sh turned
out to not be cleaning up directories when removing content
from them, so it made sense for it to use this.
Remote.Directory did not need it, and since its cleanup method for empty
directories is more efficient than what Command.Export will need to do
to find empty directories, it uses Nothing so that extra work can be
avoided.
This commit was sponsored by Thom May on Patreon.
Diffstat (limited to 'doc/design/external_special_remote_protocol.mdwn')
-rw-r--r-- | doc/design/external_special_remote_protocol.mdwn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn index 95ef13041..401c42d6c 100644 --- a/doc/design/external_special_remote_protocol.mdwn +++ b/doc/design/external_special_remote_protocol.mdwn @@ -176,6 +176,17 @@ replying with `UNSUPPORTED-REQUEST` is acceptable. `REMOVE-FAILURE`. If the content was already not present in the remote, it should respond with `REMOVE-SUCCESS`. +* `REMOVEEXPORTDIRECTORY Directory` + Requests the remote remove an exported directory. + If the remote does not use directories, or automatically cleans up + empty directories, this does not need to be implemented. + The directory will be in the form of a relative path, and may contain path + separators, whitespace, and other special characters. + Typically the directory will be empty, but it could possbly contain + files or other directories, and it's ok to remove those. + The remote responds with either `REMOVEEXPORTDIRECTORY-SUCCESS` + or `REMOVEEXPORTDIRECTORY-FAILURE`. + Should not fail if the directory was already removed. * `RENAMEEXPORT Key NewName` Requests the remote rename a file stored on it from the previously provided Name to the NewName. @@ -261,6 +272,10 @@ while it's handling a request. Indicates that a `RENAMEEXPORT` was done successfully. * `RENAMEEXPORT-FAILURE Key` Indicates that a `RENAMEEXPORT` failed for whatever reason. +* `REMOVEEXPORTDIRECTORY-SUCCESS` + Indicates that a `REMOVEEXPORTDIRECTORY` was done successfully. +* `REMOVEEXPORTDIRECTORY-FAILURE` + Indicates that a `REMOVEEXPORTDIRECTORY` failed for whatever reason. * `UNSUPPORTED-REQUEST` Indicates that the special remote does not know how to handle a request. |