Technical References - [fileinfo]

Displays information about a particular file or folder.

numero = 246
interpreted = N
texte = [fileinfo file=FilePath]File Tags[/fileinfo] 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):
[fileinfo file=../Pictures/1234.gif]File Name: [filename]
Modified: [moddate]
Size: [size]
[/fileinfo]
The following tags are available inside a [fileinfo] context:
TagDescription
[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.
[imagewidth]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.
[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.
[fileinfo file=FilePath]File Tags[/fileinfo]

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):
[fileinfo file=../Pictures/1234.gif]
File Name: [filename]

Modified: [moddate]

Size: [size]

[/fileinfo]

The following tags are available inside a [fileinfo] context:
TagDescription
[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.
[imagewidth]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.
[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.

DOWNLOAD WEBDNA NOW!

Top Articles:

WebDNA reference

...

Download WebDNA Applications

WebDNA applications...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

F.A.Q

A compilation of some user's questions...

Tips and Tricks

A list of user-submitted tips ...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

[session]

[session] is a new WebDNA feature that recognises a browser through its "fingerprint"...

[findstring]

[FindString Source=...

Database format

...

[listfiles]

When listing files...

[object]

Embeds the results of an external function...

[capitalize]

Capitalizes the first letter of all words in a sentence...