API:EPrints/Utils
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::Utils - Utility functions for EPrints.
SYNOPSIS
$boolean = EPrints::Utils::is_set( $object ) # return true if an object/scalar/array has any data in it # copy the contents of the url to a file $response = EPrints::Utils::wget( $handle, "http://www.eprints.org/index.php", "temp_dir/my_file" ) if($response->is_sucess()){ do something...} $name = { given=>"Wendy", family=>"Hall", honourific=>"Dame" }; # return Dame Wendy Hall $string = EPrints::Utils::make_name_string( $name, 1 ); # return Dame Hall, Wendy $string = EPrints::Utils::make_name_string( $name, 0 ); # returns http://www.eprints.org?var=%3Cfoo%3E $string = EPrints::Utils::url_escape( "http://www.eprints.org?var=<foo>" ); $esc_string = EPrints::Utils::escape_filename( $string ); $string = EPrints::Utils::unescape_filename( $esc_string ); $filesize_text = EPrints::Utils::human_filesize( 3300 ); # returns "3kb"
DESCRIPTION
This package contains functions which don't belong anywhere else.
METHODS