Getting Packages
Deprecated: use object handlers instead.

The servedat server may be configured to package files and directories into one or more archive formats using third party utilities.  To request packaging, append to the file name an equal-sign followed by a comma separated list of the package suffixes you are willing to accept.  For example:

movedat example.com:/path/folder=tgz,zip .

This requests that the server package directory "/path/folder" using gzip'd tar, if that is available, or otherwise using Zip.  The resulting archive would be saved in your current directory and named "folder" with a suffix indicating which format was used.

A similar mechanism can be used to execute other commands or scripts and receive their results.  See Object Handlers for details.

The package file will initially be saved with a name ending in ".TMP".  Because packages are generated in real-time by the server, they cannot be resumed if interrupted and the full size will not be known until completion.  Once the download is complete, the package will be renamed with the appropriate suffix.

If you only specify one package choice, and the server supports it, you can pipe the downloading package directly into an unpacking utility.  For example:

movedat example.com:MyDirectory=tgz | tar -zxf -

Inline compression cannot be used with packaging.  If compression is needed with packaging, it must be performed by the package utility itself.

The server will verify whether the target path exists before launching the package utility.  The transaction will fail if the path cannot be found or cannot be accessed.

Failures of the package utility itself are not detected.  If the package utility fails, the output may be empty, truncated, or corrupted depending on the utility.  To detect failures and report exit codes, use Object Handlers instead.