fs::get_archive_command (public)

 fs::get_archive_command [ -in_file in_file ] [ -out_file out_file ]

Defined in packages/file-storage/tcl/file-storage-procs.tcl

return the archive command after replacing {in_file} and {out_file} with their respective values.

Switches:
-in_file
(optional)
-out_file
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_archive_api fs_archive_api (test file-storage) fs::get_archive_command fs::get_archive_command test_fs_archive_api->fs::get_archive_command ad_conn ad_conn (public) fs::get_archive_command->ad_conn parameter::get parameter::get (public) fs::get_archive_command->parameter::get

Testcases:
fs_archive_api
Source code:
    if {[ad_conn package_key] ne "file-storage"} {
        error "fs::get_archive_command must be called inside the file-storage"
    }

    set cmd [parameter::get -parameter ArchiveCommand -default "tar cf - {in_file} | gzip > {out_file}"]

    regsub -all -- {(\W)} $in_file {\\\1} in_file
    regsub -all -- {\\/} $in_file {/} in_file
    regsub -all -- {\\\.} $in_file {.} in_file

    regsub -all -- {(\W)} $out_file {\\\1} out_file
    regsub -all -- {\\/} $out_file {/} out_file
    regsub -all -- {\\\.} $out_file {.} out_file

    regsub -all -- {{in_file}} $cmd $in_file cmd
    regsub -all -- {{out_file}} $cmd $out_file cmd

    return $cmd
Generic XQL file:
packages/file-storage/tcl/file-storage-procs.xql

PostgreSQL XQL file:
packages/file-storage/tcl/file-storage-procs-postgresql.xql

Oracle XQL file:
packages/file-storage/tcl/file-storage-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: