cr_get_file_creation_log (private)

 cr_get_file_creation_log

Defined in packages/acs-content-repository/tcl/content-procs.tcl

Return the contents of the file creation log and truncate it (i.e. remove all entries).

Partial Call Graph (max 5 caller/called nodes):
%3 cr_cleanup_orphaned_files cr_cleanup_orphaned_files (private) cr_get_file_creation_log cr_get_file_creation_log cr_cleanup_orphaned_files->cr_get_file_creation_log ad_mutex_eval ad_mutex_eval (public) cr_get_file_creation_log->ad_mutex_eval cr_fs_path cr_fs_path (private) cr_get_file_creation_log->cr_fs_path

Testcases:
No testcase defined.
Source code:
    set dir [cr_fs_path]
    set logName $dir/file-creation.log
    ad_mutex_eval [nsv_get mutex cr_file_creation] {
        if {[file readable $logName]} {
            set f [open $logName]
            set content [read $f]
            close $f
            # truncate the log file
            set f [open $logName w]; close $f
        } else {
            set content ""
        }
    }
    return $content
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: