Search code examples
smalltalk

How to read a file in smalltalk byte-wise?


I have found documentation about reading files in Smalltalk line by line, but I need to read it character by character. How do we do this in Smalltalk?


Solution

  • It would be helpful if you would identify the dialect of Smalltalk (Squeak, Pharo, VisualWorks, VA, GemStone, etc.). In any case, whatever class you found that has a #'nextLine' method should also have a #'next' method that answers a single character.