C rename remove fopen
来源:互联网 发布:sql创建存储过程语句 编辑:程序博客网 时间:2024/06/05 10:52
#include <stdio.h>int main (){ char filename[] = "file.txt"; FILE * fp ; fp = fopen(filename, "r"); if(fp == NULL) { printf("This file NOT exists"); return 0; } else { fp = fopen(filename, "r"); if(fp == NULL) { printf("This file is exists and can not reading \n"); } else { printf("This file is exists and can reading "); } } int ret; char oldname[] = "file.txt"; char newname[] = "newfile.txt"; ret = rename(oldname, newname); if(ret == 0) { printf("File renamed successfully\n"); } else { printf("Error: unable to rename the file"); } fclose(fp); ret = 0; ret = remove(newname); if(ret == 0) { printf("File deleted successfully"); } else { printf("Error: unable to delete the file"); } return(0);}
0 0
- C rename remove fopen
- linux C之rename() & remove()
- fflush,remove,rename
- rename函数及remove函数
- link、unlink、remove和rename
- fopen.c
- c fopen
- csharp: DataTable Rename ColumnName and remove Column
- csharp: DataTable Rename ColumnName and remove Column
- 文件的移动删除rename/remove
- c语言读写文件fopen和fopen
- C语言函数fopen
- c语言fopen函数
- C语言函数fopen
- C语言函数 fopen
- c语言fopen函数
- C语言函数fopen
- C库函数-fopen
- 哈希排序
- 背包问题
- OC高级foundation框架类以及数据的简单存储
- spring中的context:include-filter和context:exclude-filter的区别
- 实现ios后台缩略图模糊的一种方法
- C rename remove fopen
- uva140 - Bandwidth
- 笔记:Deep fried convnets
- Servlet_09_ServletContext(续2)
- IOS中获取各种文件的目录路径的方法
- popen和system区别
- Android工作中用的到的好网站
- 在wpf的dataGrid中按Enter键自动跳到下一行
- hadoop-2.4.1分布式安装