From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 08899BB81 for ; Mon, 10 Apr 2006 17:03:44 +0200 (CEST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k3AF3hPH031898 for ; Mon, 10 Apr 2006 17:03:43 +0200 Received: by zproxy.gmail.com with SMTP id 13so827343nzp for ; Mon, 10 Apr 2006 08:03:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NcHl1lJcS0L01kxwZ75YayDbwRaobLtCroiBwcYWKENJWccltsQk6t5oRvNuvS0D8FzE5p1uPoDMWvhO6Ictzzo+fPLYjOA5Sd/QSPfFjb+hJ0t3VBRYb9nlsNE/MWlaldzy2c8VZIIC41Rdi3Ab88DhgdqgkF24kVJIlgbAFPQ= Received: by 10.36.247.73 with SMTP id u73mr2488821nzh; Sat, 08 Apr 2006 03:58:29 -0700 (PDT) Received: by 10.36.121.13 with HTTP; Sat, 8 Apr 2006 03:58:28 -0700 (PDT) Message-ID: Date: Sat, 8 Apr 2006 22:58:28 +1200 From: "Jonathan Roewen" To: OCaml Subject: [Caml-list] really_input won't read in an entire file... MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 443A73CF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; toplevel:01 val:01 abstr:01 val:01 buf:01 buf:01 caml-list:01 exception:01 int:01 len:02 len:02 string:02 string:02 seems:03 let:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hi, Here's an example running in the toplevel, which doesn't seem to work: # let ic =3D open_in "C:/texture.raw";; val ic : in_channel =3D # let len =3D in_channel_length ic;; val len : int =3D 196608 # let buf =3D String.create len;; val buf : string =3D .... # 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