To display information about a file or folder (including whether it exists or not), place a [FileInfo] context into a WebDNA template. You may specify an absolute or relative path to the file just as you would specify an absolute or relative URL. The file name itself may be a WebDNA [xxx] tag.
Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):
The following tags are available inside a [FileInfo] context:
Tag | Description |
---|---|
[IsFolder]
|
"T" if this item is actually a folder. "F" otherwise. |
[IsFile]
|
"T" if this item is actually a file. "F" otherwise. |
[Exists]
|
"T" if this file/folder actually exists on disk. |
[FileName]
|
Name of the file. |
[FullPath]
|
Full path to the file. |
[ModDate]
|
Last date the file was modified. |
[ModTime]
|
Last time the file was modified. |
[Size]
|
the file's size, in bytes. |
[StartPath]
|
The folder path leading to the file. |
If the file is a GIF or JPEG file, displays the image's width in pixels. This can be very slow for large JPEG files, because the entire file must be read into memory first. We suggest you do this only once, then store the information in a database somewhere. | |
New in 4.0
[ImageHeight] |
If the file is a GIF or JPEG file, displays the image's height in pixels. This can be very slow for large JPEG files, because the entire file must be read into memory first. We suggest you do this only once, then store the information in a database somewhere. |