fs::publish_url_to_file_system (public)

 fs::publish_url_to_file_system -object_id object_id [ -path path ] \
    [ -file_name file_name ]

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

publish a URL object to the filesystem as a Windows shortcut (which at least KDE also knows how to handle)

Switches:
-object_id
(required)
-path
(optional)
-file_name
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::publish_url_to_file_system fs::publish_url_to_file_system test_fs_publish_file->fs::publish_url_to_file_system ad_file ad_file (public) fs::publish_url_to_file_system->ad_file ad_mktmpdir ad_mktmpdir (public) fs::publish_url_to_file_system->ad_mktmpdir ad_sanitize_filename ad_sanitize_filename (public) fs::publish_url_to_file_system->ad_sanitize_filename db_1row db_1row (public) fs::publish_url_to_file_system->db_1row fs::publish_object_to_file_system fs::publish_object_to_file_system (public) fs::publish_object_to_file_system->fs::publish_url_to_file_system

Testcases:
fs_publish_file
Source code:
    if {$path eq ""} {
        set path [ad_mktmpdir]
    }

    db_1row select_object_metadata {}

    if {$file_name eq ""} {
        set file_name $name
    }
    set file_name "${file_name}.url"
    set file_name [ad_sanitize_filename  -collapse_spaces  -tolower  $file_name]

    set fp [open [ad_file join $path $file_name] w]
    puts $fp {[InternetShortcut]}
    puts $fp URL=$url
    close $fp

    return [ad_file join $path $file_name]
Generic XQL file:
<fullquery name="fs::publish_url_to_file_system.select_object_metadata">
    <querytext>
            select fs_urls_full.*
            from fs_urls_full
            where fs_urls_full.object_id = :object_id
        </querytext>
</fullquery>
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: