NaturalDocs:: Project:: File

A simple information class about project files. 

Summary
A simple information class about project files.
The class is implemented as a blessed arrayref.
Creates and returns a new file object.
Returns whether the file contains Natural Docs content or not.
Returns the integer timestamp of when the file was last modified.
Returns the status of the file since the last build.
Returns the file’s default title on the menu.
Sets whether the file contains Natural Docs content or not.
Sets the file’s last modification timestamp.
Sets the file’s status since the last build.
Sets the file’s default title on the menu.

Implementation

Members

The class is implemented as a blessed arrayref.  The following constants are used as indexes. 

HAS_CONTENTWhether the file contains Natural Docs content or not. 
LAST_MODIFIEDThe integer timestamp of when the file was last modified. 
STATUSStatus since the last build.  One of the File Status Constants
DEFAULT_MENU_TITLEThe file’s default title in the menu. 

Functions

New

sub New #(hasContent, lastModified, status, defaultMenuTitle)

Creates and returns a new file object. 

Parameters

hasContentWhether the file contains Natural Docs content or not. 
lastModifiedThe integer timestamp of when the file was last modified. 
statusThe file’s status since the last build.  One of the File Status Constants
defaultMenuTitleThe file’s title in the menu. 

Returns

A reference to the new object. 

HasContent

sub HasContent

Returns whether the file contains Natural Docs content or not. 

LastModified

sub LastModified

Returns the integer timestamp of when the file was last modified. 

Status

sub Status

Returns the status of the file since the last build.  Will be one of the File Status Constants

DefaultMenuTitle

sub DefaultMenuTitle

Returns the file’s default title on the menu. 

SetHasContent

sub SetHasContent #(hasContent)

Sets whether the file contains Natural Docs content or not. 

SetLastModified

sub SetLastModified #(lastModified)

Sets the file’s last modification timestamp. 

SetStatus

sub SetStatus #(status)

Sets the file’s status since the last build. 

SetDefaultMenuTitle

sub SetDefaultMenuTitle #(menuTitle)

Sets the file’s default title on the menu.