file-info( path a,[qualifier b])


Returns a semicolon-separated list of file information. a is the filename given by relative or absolute path. If b is set, only a single file information should be returned. If b is set to h or header, the semicolon-separated list of property names is returned. When setting param b to a value not contained in the table below, then an exception is thrown. Parameter b can have the following values:

Short Form

Long Form

Meaning

h

header

Instead of the file information values, a list of semicolon separated header texts is returned.

p

parent

The directory the file or directory resides in. The path will be returned as absolute path in canonical form using / as separator.

n

name

The file- or directory name without path.

t

type

The type of the file: d for a directory, f for a file and ? for a device, named pipe, etc. (with Unix systems).

s

size

The size of the files in bytes. A directory always has size 0.

m

modified

The last modification in ISO format.

r

read

true if the file/directory is readable.

w

write

true if the file/directory is writeable.

If the given file does not exist, empty values are returned.

Description of Parameters

Parameter

Description

a

Filename with relative or absolute path.

b

(optional) Add additional header info or restrict to specific info.

Examples

Parameter a

Parameter b

Result

/temp/existingfile

/temp;existingfile;f;5000;2011-04-23 12:34:56.0;true;false

/temp/nonexistingfile

;;;;;;

/temp/existingfile

h

parent;name;type;size;modified;read;write

/temp/existingfile

s

5000

/temp/existingfile

size

5000