rename()

Usenet file owner usenet at cps3xx.UUCP
Mon Aug 28 09:13:02 AEST 1989


In article <Aug.26.22.24.20.1989.10338 at topaz.rutgers.edu> armhold at 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 at frith.cl.msu.edu



More information about the Comp.lang.c mailing list