int rename(const char *fileURL, const char *newname)


Method Description

Use this function to rename a file. Unlike its standard equivalent, this method will not move a file between directories.

fileURL is the full file location. This should be a real file, and no directories are accepted.

newname is the new name for the file, coded in ASCIIZ. The file will be in the same directory, so this shouldn't be a URL.

This function returns 0 on success and -1 on error with error() returning the corresponding error code.

See also :

Create a file. URLs are accepted. Works as its standard equivalent.
int creat(const char* file="", int mode=0644)

Unlink will delete or unlink the file depending on target OS
int unlink(const char *file)


Copyright © Nicolas Brodu, 1999 - 2000