delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/20/07:55:54

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: moving a file
Date: Mon, 19 Jan 1998 18:31:56 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 15
Message-ID: <34C3E26C.6CD0@cs.com>
References: <69ubvo$ebi AT leporello DOT cs DOT unibo DOT it> <69utdk$rag AT freenet-news DOT carleton DOT ca>
NNTP-Posting-Host: ppp205.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Paul Derbyshire wrote:
> 
> Flame me if I'm wrong, but isn't there a libc function for moving files?

Try rename().  That's all a move really is, unless you "move" a file to
a different drive, in which case it's a copy/delete.  Implementation of
the latter is left as an exercise for the reader.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "It may be better to be a live jackal|
|       aka Fighteer I       | than a dead lion, but it is better   |
|   mailto:fighteer AT cs DOT com   | still to be a live lion."            |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019