Hi,

I don't think that FileSystem is caching entries... However, we found somehow related bug the other day with Mariano and Pablo while running OSSupprocess tests on travis/linux. The bug is as follows. The test was doing:

'/tmp' asFileReference entries do: [...]

And then it was calling 'lsof' over pharo's pid to know files that pharo has open.

funny thing is that lsof was telling us that '/tmp' was open! When we already retrieved the entries and the file reference was collected...

The same in osx or local linux mate running in a virtual box did not happen :/.



On Sat, Oct 7, 2017 at 5:44 PM, Steven R. Baker <steven@stevenrbaker.com> wrote:



On 07/10/17 14:22, Peter Uhn��k wrote:
On Sat, Oct 7, 2017 at 1:02 PM, Steven R. Baker <steven@stevenrbaker.com> wrote:
Is it cached or something? How do I guarantee that I'm *definitely*
getting the current state of the directory on disk?

This looks extremely strange, I've never seen that inspecting files/directories would be somehow "out of sync" with the disk, because it is always asking the disk.



Should I not even be using FileReference for this?

If you are loading png icons into Pharo, you can consider using��https://github.com/peteruhnak/IconFactory/ instead (shameless self promotion :) )

Will definitely switch to this; I wasn't aware of the pattern, but obviously I want to follow them where possible. :)

Peter




--

������

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13