[Pharo-project] Some comments about Filesystem
Some comments about Filesystem: I am trying to use your library for file processing. I had the following: (FileStream fileNamed: 'inc.c.xml' ) readStream next => $< With Filesystem, I obtain the following: (FSDiskFilesystem current referenceTo: 'inc.c.xml') readStream next => 60 The problem is that the XML library does the #next, which expects a character, and not integer. I do instead: (FSDiskFilesystem current referenceTo: filenameString) readStreamDo: [:stream | . document := self parse: (ReadStream on: stream contents asString). ... But there should be a nicer way to obtain a character stream from a file. Another comment, why not to have FSReference>>files and FSReference>>directories? Although the visitors are convenient, I feel it will be useful to add #files and #directories. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I'm not sure that colin reads the pharo mailing-list. Stef On Nov 24, 2009, at 4:19 PM, Alexandre Bergel wrote:
Some comments about Filesystem:
I am trying to use your library for file processing. I had the following: (FileStream fileNamed: 'inc.c.xml' ) readStream next => $<
With Filesystem, I obtain the following: (FSDiskFilesystem current referenceTo: 'inc.c.xml') readStream next => 60
The problem is that the XML library does the #next, which expects a character, and not integer. I do instead: (FSDiskFilesystem current referenceTo: filenameString) readStreamDo: [:stream | . document := self parse: (ReadStream on: stream contents asString). ... But there should be a nicer way to obtain a character stream from a file.
Another comment, why not to have FSReference>>files and FSReference>>directories? Although the visitors are convenient, I feel it will be useful to add #files and #directories.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Alexandre Bergel -
Stéphane Ducasse