Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

import_resource()

Parameters

ColumnTypeDefaultDescription
$path
$type
$title
$ingest false
$createPreviews true
$extension ''

Location

include/resource_functions.php lines 4333 to 4344

Definition

 
function import_resource($path,$type,$title,$ingest=false,$createPreviews=true$extension='')
    {
    global 
$syncdir;
    
// Import the resource at the given path
    // This is used by staticsync.php and Camillo's SOAP API
    // Note that the file will be used at it's present location and will not be copied.

    
$r=create_resource($type);
    
// Log this in case the original location is not stored anywhere else
    
resource_log(RESOURCE_LOG_APPEND_PREVIOUS,LOG_CODE_CREATED,'','',''$syncdir DIRECTORY_SEPARATOR $path);
    return 
update_resource($r$path$type$title$ingest$createPreviews$extension);
    }

This article was last updated 8th May 2021 09:05 Europe/London time based on the source file dated 7th May 2021 12:10 Europe/London time.