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

...

[biotype]

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

WebDNA Modules

A list of the currently available modules...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

Download WebDNA Applications

WebDNA applications...

F.A.Q

A compilation of some user's questions...

Related Readings:

[session]

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

[setheader]

Changes header values in a shopping cart...

[writefile]

[writefile] functions allows you to perform a wide variety of tasks...

[elapsedtime]

...

[renamefile]

Rename a file in your webspace...

[username]

Using [password] and [username] is an easy was to show the browser login dialog box...