From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 970E981799 for ; Fri, 26 Jul 2013 12:46:15 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mihamina@rktmb.org) identity=pra; client-ip=217.70.183.196; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mihamina@rktmb.org"; x-sender="mihamina@rktmb.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mihamina@rktmb.org) identity=mailfrom; client-ip=217.70.183.196; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mihamina@rktmb.org"; x-sender="mihamina@rktmb.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@relay4-d.mail.gandi.net) identity=helo; client-ip=217.70.183.196; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mihamina@rktmb.org"; x-sender="postmaster@relay4-d.mail.gandi.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowBAINS8lHZRrfEnGdsb2JhbABagztQgw+FXZ9+ijOKJ4EWFg4BAQEBAQYNCQkUKIIJGwEBAQQjVRELBAETCRYLAgIJAwIBAgFFEwgBAYgKBgIGpzCRWJAEFoJNgSIDiSSOO4EphHqHcIZQgic X-IPAS-Result: AowBAINS8lHZRrfEnGdsb2JhbABagztQgw+FXZ9+ijOKJ4EWFg4BAQEBAQYNCQkUKIIJGwEBAQQjVRELBAETCRYLAgIJAwIBAgFFEwgBAYgKBgIGpzCRWJAEFoJNgSIDiSSOO4EphHqHcIZQgic X-IronPort-AV: E=Sophos;i="4.89,750,1367964000"; d="scan'208,217";a="27410504" Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 Jul 2013 12:46:09 +0200 Received: from mfilter24-d.gandi.net (mfilter24-d.gandi.net [217.70.178.152]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 57505172089 for ; Fri, 26 Jul 2013 12:46:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter24-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter24-d.gandi.net (mfilter24-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id YN3gDd2gvnwn for ; Fri, 26 Jul 2013 12:46:07 +0200 (CEST) X-Originating-IP: 41.188.46.121 Received: from [192.168.129.7] (unknown [41.188.46.121]) (Authenticated sender: out@rktmb.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1F8A91720A1 for ; Fri, 26 Jul 2013 12:46:06 +0200 (CEST) Message-ID: <51F2536B.5060105@rktmb.org> Date: Fri, 26 Jul 2013 13:46:03 +0300 From: Mihamina Rakotomandimby User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------000103010803070308030301" Subject: Re: [Caml-list] portable truncate This is a multi-part message in MIME format. --------------000103010803070308030301 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2013-07-26 13:35, Florent Monnier wrote: > I would like to know how to truncate a file under MS/Windows. > When I use any of the functions Unix.(LargeFile.)[f]truncate I get > these exceptions: > > Exception: Invalid_argument "Unix.truncate not implemented". > Exception: Invalid_argument "Unix.LargeFile.ftruncate not implemented". > > 1) I thought that the module Unix only contains portable things for > Windows, so it's not true? Well, reading http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html I see: Interface to the Unix system It seems pretty clear to me... -- RMA. --------------000103010803070308030301 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 2013-07-26 13:35, Florent Monnier wrote:
I would like to know how to truncate a file under MS/Windows.
When I use any of the functions Unix.(LargeFile.)[f]truncate I get
these exceptions:

Exception: Invalid_argument "Unix.truncate not implemented".
Exception: Invalid_argument "Unix.LargeFile.ftruncate not implemented".

1) I thought that the module Unix only contains portable things for
Windows, so it's not true?


Well, reading http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html I see:
Interface to the Unix system

It seems pretty clear to me...

-- 
RMA.
--------------000103010803070308030301--