On Tue, Jun 20, 2017 at 04:22:31AM -0300, Hern??n Morales Durand wrote: > > > 2017-06-20 3:14 GMT-03:00 Alistair Grant <akgrant0...@gmail.com>: > > Hi Hernan, > > On Mon, Jun 19, 2017 at 09:23:35PM -0300, Hern??n Morales Durand wrote: > > I took the time to review FileSystemDirectoryEntry. > > > > UNIX has 3 types of timestamps > > > > -The access time is the last time when the content was accessed. > > -The modification time is last time when the content was modified. > > -The change time is the last time when the metadata was modified. > > > > FileSystemDirectoryEntry>>creationTime > > This is wrong because there is no such thing as creation time in UNIX. > > Several linux file systems do support creation time, called birth time, > but my understanding is that there is no standard way to retrieve the > birth time commonly available and cross platform. > > > > Thanks for the update, I checked and creation time seems not required by > POSIX. > > > > I checked in Linux chmod'ing an empty file and #creationTime displays > the > chmod > > "change time". > > Then added content to the file > > > > echo prueba >> test1.txt > > > > And both "creation" and "modification" instance variables were updated. > > > > I couldn't find #accessTime method to get the last timestamp of last > access. > > Linux kernel 4.11 introduced statx(), which adds creation time, but I > don't know if it will be adopted by BSD or MacOS. > > The patches I mentioned earlier and plan for Pharo 7 add support for all > 4 timestamps (creation, change, modification, access). Which fields get > populated depends on the platform. There's a #hasCreationTime flag > which allows you to distinguish between the real creation time and the > change time. > > > > Maybe #creationTime should answer nil or raise an exception if not supported > by > underlying file system. > > It would be nice to has full support for tags.
If this were new behaviour I would raise an exception, but currently my version of #creationTime continues to return the change time for backward compatibility (it also seems to be common behaviour on Posix systems). The #hasCreationTime flag is there for applications that want to be specific in their behaviour. I'm open to changing this if there is sufficient support or a good enough argument. Cheers, Alistair