From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA28385; Wed, 23 Jun 2004 18:37:29 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA29082 for ; Wed, 23 Jun 2004 18:37:28 +0200 (MET DST) From: padiolea@irisa.fr Received: from smtp.irisa.fr (smtp.irisa.fr [131.254.254.26]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5NGbREV010152 for ; Wed, 23 Jun 2004 18:37:27 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost.irisa.fr (Postfix) with ESMTP id 2F2BCFBCD; Wed, 23 Jun 2004 18:37:27 +0200 (CEST) Received: from smtp.irisa.fr ([131.254.254.26]) by localhost (meli.irisa.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10745-08; Wed, 23 Jun 2004 18:37:26 +0200 (CEST) Received: from mail.irisa.fr (melo.irisa.fr [131.254.254.28]) by smtp.irisa.fr (Postfix) with SMTP id A84ADFB86; Wed, 23 Jun 2004 18:37:26 +0200 (CEST) Received: from 81.249.221.239 (SquirrelMail authenticated user padiolea) by mail.irisa.fr with HTTP; Wed, 23 Jun 2004 18:37:26 +0200 (CEST) Message-ID: <1069.81.249.221.239.1088008646.squirrel@mail.irisa.fr> In-Reply-To: <40D9A7E7.2060703@aber.ac.uk> References: <40D9A7E7.2060703@aber.ac.uk> Date: Wed, 23 Jun 2004 18:37:26 +0200 (CEST) Subject: Re: [Caml-list] file copy To: "Sebastien Ferre" Cc: caml-list@inria.fr User-Agent: SquirrelMail/1.4.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at irisa.fr X-Miltered: at nez-perce with ID 40D9B1C7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bug:01 faq:01 faq:01 beginner's:01 beginners:01 bin:01 caml-bugs:01 ocaml:01 ocaml:01 caml:01 caml:01 command:98 command:98 groups:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Hi, > > is there any function in OCaml for copying a file > like with the Unix command 'cp' ? I wish to avoid > using the function Sys.command to keep platform > independency. In fact there is no copy operation in a filesystem (observe the output of the command 'strace cp /tmp/titi /tmp/titi'). You can emulate the copy by combining reading and writing, as the cp do, so in ocaml combining functions input and ouput. > I could not find any neither in the standard library, > nor in the Unix library. > > Cheers, > Sébastien > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: > http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners