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 Libraries

A list of available libraries for WebDNA...

Technical Change History

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

AWS Raw WebDNA LAMP-Plus WebServer

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

F.A.Q

A compilation of some user's questions...

Download WebDNA Applications

WebDNA applications...

[biotype]

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

Related Readings:

[convertchars]

[url]...

[regex]

[regex] is a full implementation of grep...

[listwords]

Breaks a string of text into separate words...

DB encryption

Database Automatic Encryption (from WebDNA 8...

[xsl]

Enables the WebDNA programmer to compile and apply XSL style sheets to XML data...

[flushcache]

...