content::revision::export_to_filesystem-file (private)
content::revision::export_to_filesystem-file -revision_id revision_id \ -filename filename
Defined in packages/acs-content-repository/tcl/content-revision-procs.tcl
Export the content of the provided revision to the named file in the filesystem.
- Switches:
- -revision_id (required)
- -filename (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set cr_file_name [content::revision::get_cr_file_path -revision_id $revision_id] # # Check if cr_file_name is not empty, otherwise we could end up copying the # whole content-repository. # if {$cr_file_name ne ""} { # # When there are multiple "unnamed files" in a directory, the # constructed filename might exist already. This would lead to an # error in the "file copy" operation. Therefore, generate a new # name with an alternate suffix in these cases. # set base_name $filename set count 0 while {[ad_file exists $filename]} { set filename $base_name-[incr $count] } file copy -- $cr_file_name $filename } else { ad_log Warning "::content::revision::export_to_filesystem-file: cr_file_name is empty (revision_id: $revision_id)" }Generic XQL file: packages/acs-content-repository/tcl/content-revision-procs.xql
PostgreSQL XQL file: packages/acs-content-repository/tcl/content-revision-procs-postgresql.xql
Oracle XQL file: packages/acs-content-repository/tcl/content-revision-procs-oracle.xql