blob: 9c40c2faada25fac2a15793b628c2606463efcde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <stdio.h>
#include <errno.h>
int main()
{
int output=0;
int error_code =0 ;
output=rename( "/home/timothy/test/cat/","/home/timothy/test/dog/");
printf("output %d\n",output);
if (output <0 ) {
error_code = errno;
printf("error code %d\n",error_code);
printf("Error description is : %s\n",strerror(errno));
}
return 0;
}
|