Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
API:EPrints/DataObj/File
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/File.pm|package_name=EPrints::DataObj::File}}[[Category:API|FILE]][[Category:API:EPrints/DataObj|FILE]]<div><!-- Edit below this comment --> <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> ==NAME== '''EPrints::DataObj::File''' - a stored file <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_description --> ==DESCRIPTION== This class contains the technical metadata associated with a file. A file is a sequence of bytes stored in the storage layer (a "stored object"). Utility methods for storing and retrieving the stored object from the storage layer are made available. Revision numbers on File work slightly differently to other objects. A File is only revised when it's stored object is changed and not when changes to it's metadata are made. This class is a subclass of [[API:EPrints/DataObj/SubObject|EPrints::DataObj::SubObject]]. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_core_metadata_fields --> ==CORE METADATA FIELDS== <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_fileid --> ===fileid (counter)=== Unique identifier for this file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_datasetid --> ===datasetid (id)=== Id of the dataset of the parent object. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_objectid --> ===objectid (int)=== Id of the parent object. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_filename --> ===filename (id)=== Name of the file (may contain directory separators). <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_mime_type --> ===mime_type (id)=== MIME type of the file (e.g. "image/png"). <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_hash --> ===hash (id)=== Check sum of the file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_hash_type --> ===hash_type (id)=== Name of check sum algorithm used (e.g. "MD5"). <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_filesize --> ===filesize (bigint)=== Size of the file in bytes. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_mtime --> ===mtime (timestamp)=== Last modification time of the file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_url --> ===url (url)=== Virtual field for storing the file's URL. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_data --> ===data (base64)=== Virtual field for storing the file's content. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_references_and_related_objects --> ==REFERENCES AND RELATED OBJECTS== None. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_instances_variables --> ==INSTANCES VARIABLES== See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj]]. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_methods --> ==METHODS== <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_constructor_methods --> ===Constructor Methods=== <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_new_from_filename --> ====new_from_filename==== $dataobj = EPrints::DataObj::File->new_from_filename( $session, $dataobj, $filename ) Convenience method to return an existing file object for <tt>$filename</tt> stored in <tt>$dataobj</tt>. Returns <tt>undef</tt> if no such record exists. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_create_from_data --> ====create_from_data==== $dataobj = EPrints::DataObj::File->create_from_data( $session, $data, $dataset ) Returns a new file record using <tt>$data</tt> and the file <tt>$dataset</tt>. Private data elements: _content - content to pass to [[API:EPrints/DataObj/File#set_file|set_file]]. _filepath - path to source file used for improved mime-type detection <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_class_methods --> ===Class Methods=== <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_system_field_info --> ====get_system_field_info==== $fields = EPrints::DataObj::File->get_system_field_info Returns an array describing the system metadata fields of the file dataset. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_dataset_id --> ====get_dataset_id==== $dataset = EPrints::DataObj::File->get_dataset_id Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_object_methods --> ===Object Methods=== <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_clone --> ====clone==== $new_file = $file->clone( $parent ) Clone the file object (including contained files) and return the new object. Uses <tt>$parent</tt> to set the <tt>objectid</tt> of the cloned file data object, in case this needs to be different to the original. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_remove --> ====remove==== $success = $file->remove Delete the file data object and the file it stores. Returns boolean depending on the success of removing this file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_update --> ====update==== $file->update( $epdata ) Updates the metadata for the file with <tt>$epdata</tt>. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_local_copy --> ====get_local_copy==== $filename = $file->get_local_copy Returns the name of a local copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object). Uses [[API:EPrints/Storage#get_local_copy|EPrints::Storage#get_local_copy]] which in turn calls the configured local storage plugin. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_remote_copy --> ====get_remote_copy==== $filename = $file->get_remote_copy Returns the name of a remote copy of the file (may be a {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}} object). Uses [[API:EPrints/Storage#get_local_copy|EPrints::Storage#get_local_copy]] which in turn calls the configured remote storage plugin. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_add_file --> ====add_file==== $success = $file->add_file( $filepath, $filename [, $preserve_path ] ) Reads and stores the contents of <tt>$filepath</tt> at <tt>$filename</tt>. If <tt>$preserve_path</tt> is not <tt>true</tt> will strip any leading path in <tt>$filename</tt>. Returns a boolean depending on the success of adding the file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_upload --> ====upload==== $bytes = $file->upload( $filehandle, $filename, $filesize [, $preserve_path ] ) Reads and stores the data from <tt>$filehandle</tt> at <tt>$filename</tt> at the next revision number. If <tt>$preserve_path</tt> is not <tt>true</tt> will strip any leading path in <tt>$filename</tt>. Returns the number of bytes read from $filehandle or undef on failure. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_write_copy --> ====write_copy==== $success = $file->write_copy( $filename ) Write a copy of this file to <tt>$filename</tt>. Returns <tt>true</tt> if the written file contains the same number of bytes as the stored file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_write_copy_fh --> ====write_copy_fh==== $success = $file->write_copy_fh( $filehandle ) Write a copy of this file to <tt>$filehandle</tt>. Returns boolean depending on success of writing copy of file to the file handle. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_generate_md5 --> ====generate_md5==== $md5 = $file->generate_md5 Calculates and returns the MD5 for this file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_update_md5 --> ====update_md5==== $md5 = $file->update_md5 Generates MD5 and sets <tt>hash</tt> and <tt>has_type</tt> (as <tt>MD5</tt>) for this file data object. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_generate_sha --> ====generate_sha==== $digest = $file->generate_sha( [ $alg ] ) Generates a SHA for this file, see {{API:PodLink|file=Digest/SHA|package_name=Digest::SHA|section=|text=Digest::SHA}} for a list of supported algorithms. Defaults to <tt>256</tt> (SHA-256) if <tt>$alg</tt> is not set. Returns the hex-encoded digest. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_update_sha --> ====update_sha==== $md5 = $file->update_sha Generates a SHA for this file, see {{API:PodLink|file=Digest/SHA|package_name=Digest::SHA|section=|text=Digest::SHA}} for a list of supported algorithms. Defaults to <tt>256</tt> (SHA-256) if <tt>$alg</tt> is not set. Then sets the <tt>hash</tt> and c<has_type> for this file data object. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_to_sax --> ====to_sax==== $file->to_sax( %opts ) Generate SAX output for file data object and assign to <tt>Output</tt> of <tt>Handler</tt> specified in <tt>%opts</tt>. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_add_plugin_copy --> ====add_plugin_copy==== $file->add_plugin_copy( $plugin, $sourceid ) Add a copy of this file stored using <tt>$plugin</tt> identified by <tt>$sourceid</tt>. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_remove_plugin_copy --> ====remove_plugin_copy==== $file->remove_plugin_copy( $plugin ) Remove the copy of this file stored using <tt>$plugin</tt>. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_file --> ====get_file==== $success = $file->get_file( $f, [ $offset, $n ] ) Get the contents of the stored file. <tt>$offset</tt> is the position in bytes to start reading from, defaults to 0. <tt>$n</tt> is the number of bytes to read, defaults to <tt>filesize</tt>. <tt>$f</tt> is: sub { my( $buffer ) = @_; ... return 1; } Returns boolean dependent on whether file was successfully retrieved. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_set_file --> ====set_file==== $content_length = $file->set_file( $content, $clen ) Write <tt>$clen</tt> bytes from <tt>$content</tt> to the file object. Updates <tt>filesize</tt> and <tt>hash</tt>. You must then call [[API:EPrints/DataObj/File#commit|commit]]) to save these changes. Returns an integer for the content length or <tt>undef</tt> on failure. <tt>$content</tt> may be one of: CODEREF - Will be called until it returns empty string (""). SCALARREF - A scalar reference to a string of octets that will be written as-is. GLOB - Will be treated as a file handle and read with sysread(). <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_set_file_chunk --> ====set_file_chunk==== $content_length = $file->set_file_chunk( $content, $clen, $offset, $total ) Write a chunk of data to the content, overwriting or appending to the existing content. See [[API:EPrints/DataObj/File#set_file|set_file]] for <tt>$content</tt> and <tt>$clen</tt>. <tt>filesize</tt> is updated if <tt>$offset + $content_length</tt> is greater than the current <tt>filesize</tt>. <tt>$offset</tt> is the starting point (in bytes) to write. <tt>$total</tt> is the total size of the file, used to determine where to store the content. Returns the number of bytes written or <tt>undef</tt> on failure. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_start_element --> ====start_element==== $file->start_element( $data, $epdata, $state ) Consumes a SAX event. See <EPrints::DataObj#start_element> for more information. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_end_element --> ====end_element==== $file->end_element( $data, $epdata, $state ) Ends element from [[API:EPrints/DataObj/File#start_element|start_element]]. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_characters --> ====characters==== $file->characters( $data, $epdata, $state ) Consumes characters within [[API:EPrints/DataObj/File#start_element|start_element]]. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_filesize --> ====render_filesize==== EPrints::DataObj::File->render_filesize( $repo, $field, $value ) Returns an XHTML DOM fragment, which is either empty if <tt>$value</tt> is not set or a human-readable rendering of this file size. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_url --> ====get_url==== $file->get_url Returns the URL from which this file can be downloaded. Calls [[API:EPrints/DataObj/Document#get_url|EPrints::DataObj::Document#get_url]] on the parent object for this file with the <tt>filename</tt> as a parameter. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_path --> ====path==== $file->path Returns the filesystem path for this file. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_see_also --> ==SEE ALSO== [[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]]. <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_copyright --> ==COPYRIGHT== {{API:Copyright}} <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> <span style='display:none'>User Comments</span> <!-- Edit below this comment --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:API
(
edit
)
Template:API:Copyright
(
edit
)
Template:API:PodLink
(
edit
)
Template:API:Source
(
edit
)
Template:Pod2Wiki
(
edit
)
Template:RefLinks
(
edit
)