File.pm


NAME

Communiware::Filter::File - filter to list files of current item.


SYNOPSIS

  ::File
  ::File(pattern)


DESCRIPTION

This filter lists all the files in the files directory of current item. Without argument it creates context consisting some attributes with file properties.

Pattern can be any pattern acceptable by glob(). (like *.doc, icon.*) If pattern is specified then only files matching glob pattern are returned.

ATTRIBUTES

FILENAME
File name.

BASENAME
File name without extension.

EXTENSION
Extension of file.

FILESIZE
Size of file in bytes.

IS_TEXT
True if file is a text file.

IS_PICTURE
True if file has media type started as 'image/', e.g. 'image/gif', 'image/jpeg', 'image/png'.

PIC_WIDTH
Width of picture.

PIC_HEIGHT
Height of picture.

PIC_FORMAT
Format of picture, e.g. 'GIF', 'JPG', 'SWC', 'TIF'.

WIDTH
Equals to b<PIC_WIDTH>. Added for compatibility with ::Pic.

HEIGHT
Equals to b<PIC_HEIGTH>. Added for compatibility with ::Pic.

MIME_TYPE
Media type of file determined by file extension.

16 октябрь 2007 13:44