The mgiGetFileInfo Tag
Tag Behavior
Use the mgiGetFileInfo tag to display information about a
file.
Tag Syntax
The mgiGetFileInfo tag has one required parameter and five
optional parameters. The tag form is:
<mgiGetFileInfo info="Type" fileLocation="File Path"
format="Format" html="HTML" text="String" units="Units">
Required Parameters:
- info - Info is the type of file information to display.
Valid info types are:
- creationDate - The creation date of the specified
file.
- creationTime - The creation time of the specified
file.
- lastModifiedDate - The last modified date of the specified
file.
- lastModifiedTime - The last modified date of the specified
file.
- size - The size of the specified file.
- exists - Whether the specified file exists. If the
file does exist, the value "True" displays. If the
file does not exists, the value "False" displays.
- isAFolder - Whether the specified file name is a folder.
If the specified name is a folder, the value "True"
displays. If the specified name is not a folder, the value "False"
displays.
Optional Parameters:
- fileLocation - The fileLocation is the relative path
to the file to query for information. If the fileLocation parameter
is not included, the file information of the page containing
the mgiGetFileInfo tag is displayed.
- format - The format is the type of date and time information
to display. If the creationDate or lastModifiedDate is displayed,
then any date format from the mgiDate
tag may be used. If the creationTime or lastModifiedTime parameter
is displayed, then any time format from the mgiTime
tag may be used. The format parameter has no effect if the size
is displayed. You may include multiple format parameters in one
mgiGetFileInfo tag.
- html - The html is the HTML code and text that is
decoded and displayed relative to the specified date or time
formats. Any HTML in the value of the html parameter should already
be encoded (e.g., quotation marks should be entered as """).
You may include multiple html parameters in one mgiGetFileInfo
tag.
- text - The text is the string of characters that is
decoded and displayed relative to the specified date or time
formats. Text in the value of the text parameter is not decoded
prior to display. You may include multiple text parameters in
one mgiGetFileInfo tag.
- units - The units is the unit of measurement displayed
for the file size. The default value is "bytes". Valid
units values are:
- b
- bytes
- k
- kilo
- kilobytes
- m
- mega
- megabytes
- g
- giga
- gigabytes
- t
- tera
- terabytes
Example Usage and Output
<mgiGetFileInfo info="size" units="k">
In this example, the size of the HTML file containing this
mgiGetFileInfo tag is displayed in kilo-bytes.
<mgiGetFileInfo fileLocation="../contact.html"
info="lastModifiedDate">
In this example, the last modified date of the "contact.html"
file is displayed.
Suggested Usage
- Document, Image and Software Downloads
- Content Updates
|