pr_rename.rst (767B)
1 PR_Rename 2 ========= 3 4 Renames a file. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prio.h> 13 14 PRStatus PR_Rename( 15 const char *from, 16 const char *to); 17 18 19 Parameters 20 ~~~~~~~~~~ 21 22 The function has the following parameters: 23 24 ``from`` 25 The old name of the file to be renamed. 26 ``to`` 27 The new name of the file. 28 29 30 Returns 31 ~~~~~~~ 32 33 One of the following values: 34 35 - If file is successfully renamed, ``PR_SUCCESS``. 36 - If file is not successfully renamed, ``PR_FAILURE``. 37 38 39 Description 40 ----------- 41 42 :ref:`PR_Rename` renames a file from its old name (``from``) to a new name 43 (``to``). If a file with the new name already exists, :ref:`PR_Rename` 44 fails with the error code ``PR_FILE_EXISTS_ERROR``. In this case, 45 :ref:`PR_Rename` does not overwrite the existing filename.