First of all you should not hardcode the unix platform. Instead let the system resolve the platform for you:
(FSDiskFilesystem current / 'griffle') writeStream
I prefer that. I was not happy with my code.
At the moment there is no shortcut for this on String. I think it would make sense to add a method #asFilesystemReference that would try to guess the right filesystem and answer a reference. So then one could write:
'griffle' asFilesystemReference writeStream 'http://www.lukas-renggli.ch' asFilesystemReference readStream ...
currentFolder doWithAllFiles: [:each | Transcript show: each name ; show: each size ; cr]
currentFolder allChildren do: [ :each |
FSDiskFilesystem current workingDirectory allChildren do not work :( I do not understand why workingDirectory return a path and not a reference because this is not workingDirectoryPath So how can I get all the files in my current direct directory FSDiskFilesystem current childrenAt: FSDiskFilesystem current workingDirectory looks ugly
Do I have to use an FSPreOrderGuide? Are there some behavior like doWithAllFiles already defined?
Yes, in the enumeration protocol of FSReference. There are only a few algorithms there, but that will probably grow over time. The FSPreOrderGuide is an internal implementation artifact, it should not be used directly.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project