From: Chad Perrin Date: 2006-08-16T06:40:10+09:00 Subject: Re: How do I get the creation date of a file? On Wed, Aug 16, 2006 at 06:25:02AM +0900, gwtmp01@mac.com wrote: > > On Aug 15, 2006, at 5:05 PM, marek4130@gmail.com wrote: > > >Ruby's file class has three methods for querying time related data: > >atime, ctime and mtime. None of these will give me the creation > >date of > >a file. Anyone got a clue? > > There is no such thing as a creation time of a file. That's not precisely true -- the actual creation time of a file is the last time it was modified, since a "file" is a "virtual" construct for the benefit of humans. Files are actually represented on the filesystem as nothing more than an index entry of sorts that tells the read-write heads where to go looking for data stored on the drive that will be presented as an atomic object to the user via the virtual filesystem, and every time the file is changed in some way that index entry disappears and is replaced by a new entry. Thus, I suppose the "file" is created anew every time you touch the thing. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "A script is what you give the actors. A program is what you give the audience." - Larry Wall