GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
File::CreationTime(3) User Contributed Perl Documentation File::CreationTime(3)

File::CreationTime - Keeps track of file creation times

Version 2.04

Keeps track of creation times on filesystems that don't normally provide such information.

    use File::CreationTime;

    my $file = '/path/to/file';
    print "$file was created: ". creation_time($file). "\n";

     creation_time('/path/to/file')

Returns the creation time of /path/to/file in seconds past the epoch. Requires permission to modify extended filesystem attributes the first time the function is called. All subsequent invocations require read access only.

The algorithm used to determine the creation time is as follows. The first time creation_time is called, an extended filesystem attribute called creation_time is created and is set to contain the time that the file was most recently modified. As such, if you have a file that's several years old, then modify it, then call creation_time, the file's creation time will obviously be wrong. However, if you create a file, call creation_time, wait several years, modify the file, then call creation_time again, the result will be accurate.

On OS X, this method is not used. Instead, the actual creation time is provided via "MacOSX::File::Info->ctime".

You passed [path] to creation_time, but it doesn't exist (or you can't read it).

Couldn't create the attribute for some reason. Does your filesystem support extended filesystem attributes?

File::Attributes handles storing the creation_time attribute.

I'd like to support OSes that actually give you the file creation time. As of version 2.04, OS X is supported in this way. If you know how to make this work on your OS, tell me how or send me a patch.

Other comments and patches are always welcome.

Please report any bugs or feature requests to "bug-file-creationtime@rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-creationTime>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Jonathan Rockway, "<jrockway AT cpan.org>".

Dave Cardwell added OS X support.

Copyright 2005 Jonathan T. Rockway.

This program is Free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2007-09-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.