Generator: GetFileInfo
Class name: | org.weborganic.bastille.xml.GetFileInfo |
---|---|
Version: | 0.6.35 - 21 May 2012 |
Library: | Bastille |
Cacheable: | Yes |
Generated: | 2012-12-21 |
Description
Returns information about the file specified by the path info in the public folder.
If the file is a directory, lists the files corresponding to the specified directory.
Configuration
No configuration is required for this generator.
Parameters
No parameters are needed for this generator.
Returned XML
<file name="[filename]" path="[path_to_folder]" type="file" media-type="[media_type]" length="[file_size]" modified="[ISO8601_datetime]">
For a folder:
<file name="[filename]" path="[path_from_root]" type="folder"> <!-- for each file... --> <file name="" ... /> </file>
If the file does not exist:
<file name="[filename]" path="[path_to_folder]" status="not-found">
File attributes
name
– the name of the file (including extension).path
– the path from the root of the website.type
– is either ‘file’ or ‘folder’.length
– the full length of the file.modified
– the last modified date and time of the file using ISO8601.media-type
– the media type of the file based on the file extension as specified in Berlioz, if the file extension does not map to any media type returns “application/octet-stream”.content-type
– same as media type (deprecated).status
– equals ‘not-found’.
Since Version 0.6.1, this generator returns both the media-type
and content-type
attributes. Use media-type
.