int check_path(char *pathname) //检查目录是否存在而且有RWX的权限
功能说明:
检查目录是否存在,本程序是否具有对目录的RWX权限
函数参数是一个全路径文件名
int movefile(const char *target_path_name, const char *source_path_file_name) //把源文件MV到目标目录
功能说明:
把源文件现link()到目标目录,成功后再删除源文件
源文件名是全路由文件名
int touch(const char *path_file_name)
功能说明:
类似系统命令touch,是更新文件的修改时间;如果文件不存在,失败。
文件名是全路由文件名
is_null_file(const char *path_file_name)
功能说明:
判断文件是否为空文件
---------------------------------------------------------------
1.#include
1<unistd.h>
2int access(const char *pathname, int mode);
32\.
4#include <stdio.h>
5int rename(const char *oldpath, const char *newpath);
63\.
7看touch源代码
84\.
9#include <sys types.h="">
10#include <sys stat.h="">
11#include <unistd.h>
12int stat(const char *file_name, struct stat *buf);</unistd.h></sys></sys></stdio.h></unistd.h>