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:

[biotype]

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

Download WebDNA Applications

WebDNA applications...

WebDNA reference

...

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:

[hide]

Prevents WebDNA to return hidden parts of your code to apache (from version 8...

[addlineitem]

Adds a product to the specified shopping cart...

[search]

Use the [Search] context with [founditems] to easily retrieve records from your databases...

[interpret]

Interprets the enclosed [xxx] values using the WebDNA interpreter...

[text]

Text variables are fundamental building blocks of the WebDNA language...

[include]

Include the contents of the specified file...