原本以為 rename function 是 UEFI 自己寫的非標準函數,沒想到我從 C11、C99,一路查回到 C90,這個 function 老早就存在了,其宣告如下:
Synopsis
#include <stdio.h>
int rename(const char *old, const char *new);
Description
The rename function causes the file whose name is the string pointed to by old to be henceforth known by the name given by the string pointed to by new. The file named old is no longer accessible by that name It a tile named by the string pointed to by new exists prior to the call to the rename function, the behavior is implementation-defined.
Returns
The rename function returns zero if the operation succeeds. nonzero if it fails, in which case if the tile existed previously it is still known by its original name.
沒有留言:
張貼留言