Article View: comp.sys.amiga.tech
Article #959Re: rename()
From: Usenet file owner
Date: Sun, 27 Aug 1989 23:13
Date: Sun, 27 Aug 1989 23:13
22 lines
1552 bytes
1552 bytes
In article <Aug.26.22.24.20.1989.10338@topaz.rutgers.edu> armhold@topaz.rutgers.edu (George Armhold) writes:
>
>I'm working on a "mv" program. I'd like it to be smart enough to
>renaming a file to a new directory presents a problem? The function
>also seems to fail when I try to rename a directory. Am I missing
^^^^^^^^^^^^^^^^^^
I don't know what ANSI says about this, but MessyDos
has problems with renameing directories. I don't know why.
I suggest that you use AmigaDOS directly. It will
make your program smaller, faster, and non-portable, but would
do the job better.
The problem with using ANSI functions instead of the native OS
functions is that they have only a subset of the functionality
of the OS functions. The advantage to using the ANSI functions
is portablility, or course.
The AmigaDOS Rename function takes a source path and a destination
path. If you try the rename accross devices, it will
fail and IoErr() will return the "Cant rename across devices" error.
REAL NAME: Joe Porkka jap@frith.cl.msu.edu
Technical Details
Message-ID:
<4331@cps3xx.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!usenetReferences:
<Aug.26.22.24.20.1989.10338@topaz.rutgers.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!usenet From: usenet@cps3xx.UUCP (Usenet file owner) Newsgroups: comp.sys.amiga.tech,comp.lang.c Subject: Re: rename() Keywords: Lattice 5.02, beginner question Message-ID: <4331@cps3xx.UUCP> Date: 27 Aug 89 23:13:02 GMT References: <Aug.26.22.24.20.1989.10338@topaz.rutgers.edu> Reply-To: porkka@frith.UUCP (Joe Porkka) Organization: Michigan State University Lines: 22