delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/19/22:24:33

Date: Mon, 19 Jan 1998 10:38:17 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Paul Derbyshire <ao950 AT FreeNet DOT Carleton DOT CA>
cc: djgpp AT delorie DOT com
Subject: Re: moving a file
In-Reply-To: <69utdk$rag@freenet-news.carleton.ca>
Message-ID: <Pine.SUN.3.91.980119103350.20891B-100000@is>
MIME-Version: 1.0

On 19 Jan 1998, Paul Derbyshire wrote:

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

It's called `rename'.  It's even ANSI C.  The DJGPP's version can move
entire directories (not across drives, though).  One thing you should be
aware of is that, unlike other DOS implementations, it will overwrite the
destination, even if it is write-protected, because this is what POSIX
says. 

There is also a simpler and more low-level `_rename'.  Look them both up 
in the libc reference.

- Raw text -


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