[Pharo-project] FileSystem question
cputney at wiresong.ca
Tue Feb 16 23:48:14 EST 2010
On 2010-02-15, at 9:36 AM, stephane ducasse wrote:
> |working cache|
> working := FSDiskFilesystem current working.
> cache := working / 'package-cache'.
> cache entry
> cache entry creation. "--> 2010-02-14T10:34:31+00:00"
> cache entry modification. "--> 2010-02-14T10:34:31+00:00"
> cache entry size
> give me access to the file descriptor now I was wondering why we could not have
> the API of description at the level of FSreference to avoid that navigation code.
> cache creation. "--> 2010-02-14T10:34:31+00:00"
> cache modification. "--> 2010-02-14T10:34:31+00:00"
> cache size
Yes, references could provide direct access to the information in the entry. But I made it a separate object for a couple of reasons. The main one is performance. If you need to fetch several pieces of information it's more efficient to make one trip to the disk and keep all the information in one object. I ran into this problem while implementing the directory tree visitor code - it was slow, slow, slow until I implemented FSDirectoryEntry.
More information about the Pharo-dev