Win32::FileTime - Perl module for accessing Win32 file times



NAME

Win32::FileTime - Perl module for accessing Win32 file times


SYNOPSIS

 use Win32::FileTime;
 my $filename = "foo.txt";
 my $filetime = Win32::FileTime->new( $filename );
 printf( 
     "Accessed : %4d/%02d/%02d %02d:%02d:%02d",
     $filetime->Access( 
         'year', 
         'month', 
         'day', 
         'hour', 
         'minute', 
         'second' 
     )
 );


DESCRIPTION

This module is designed to provide an easy-to-use interface for obtaining creation, access and modification times for files on Win32 systems.


METHODS

The following methods are available through this module for use with Win32::FileTime objects. No methods can be exported into the calling namespace.

new
 my $filetime = Win32::FileTime->new( $filename );

This object constructor creates and returns a new Win32::FileTime object. The only mandatory argument to this object constructor is a relative or absolute file path. It is the creation, access and modification times of this file which are obtained and returned by this Win32::FileTime object.

Access( @arguments )
 my @AccessTime = $filetime->Access( @arguments );

This method returns an array corresponding to the last access time of the file specified in the object constructor.

Create( @arguments )
 my @CreateTime = $filetime->Create( @arguments );

This method returns an array corresponding to the creation time of the file specified in the object constructor.

Modify( @arguments )
 my @ModifyTime = $filetime->Modify( @arguments );

This method returns an array corresponding to the modification time of the file specified in the object constructor.

The arguments to these methods can be any combination of the following list of time field arguments - year, month, wday, day, hour, minute, second and msecond. The passing of any of these time field arguments to Win32::FileTime methods returns the respective time field in the order passed to the object method.

If no arguments are specified, the entire array of time fields is returned in the order defined above.


VERSION

0.04


AUTHOR

Frank Bardelli, Rob Casey

 Win32::FileTime - Perl module for accessing Win32 file times