Mustafa Al masri wrote:
> Hi there,
> I'm a new developer in Smalltalk. Can someone tell me how I can access
> and read a file on disk?
Hello Mustafa,
welcome in the wonderful world of Smalltalk!
Have a look at the class Filename.
You can do something like
Filename fromRootComponent: 'C:\test.txt'.
This either creates a Filename object on the existing file or a new
Filename object.
Then you can send for instance
contentsOfEntireFile
to the Filename object and you will receive the complete contents of the
file.
For a binary file, you need to send contentsOfEntireBinaryFile to it.
Hope this helps and if you have any further questions, please do not
hesitate to ask. Remember: there are no stupid questions!
Best Regards,
Claus
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc