Browse thread
[Caml-list] really_input won't read in an entire file...
- Jonathan Roewen
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-04-10 (15:03) |
From: | Jonathan Roewen <jonathan.roewen@g...> |
Subject: | [Caml-list] really_input won't read in an entire file... |
Hi, Here's an example running in the toplevel, which doesn't seem to work: # let ic = open_in "C:/texture.raw";; val ic : in_channel = <abstr> # let len = in_channel_length ic;; val len : int = 196608 # let buf = String.create len;; val buf : string = .... # really_input ic buf 0 len;; Exception: End_of_file. Is reading it chunk-by-chunk the only reliable way to read in an entire file? Seems fairly useless to me... Jonathan