rename()

This is the standard C library rename() function from stdio.h.

Show/hideSyntax

int rename(const char *old, const char *new);

Show/hideUsage

The default implementation of this function uses semihosting.

rename() causes the file whose name is the string pointed to by old to be subsequently known by the name given by the string pointed to by new. The file named old is effectively removed. If a file named by the string pointed to by new exists prior to the call of the rename() function, the behavior is implementation-defined.

Show/hideReturns

Returns zero if the operation succeeds or nonzero if it fails. If the operation returns nonzero and the file existed previously it is still known by its original name.

Show/hideSee also

Reference

ARM C and C++ Libraries and Floating-Point Support User Guide:

Copyright © 2014 ARM. All rights reserved.ARM DUI 0809B
Non-ConfidentialID121814