⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dupfinfo.c

📁 无损音频压缩源码. 毕业设计 qq 64134703 更多毕业设计 www.rmlcd.cn
💻 C
字号:
/*******************************************************************************                                                                             **       Copyright (C) 1992-1995 Tony Robinson                                 **                                                                             **       See the file LICENSE for conditions on distribution and usage         **                                                                             *******************************************************************************//* * $Id: dupfinfo.c,v 1.4 2002/01/27 16:02:53 jason Exp $ *//* * set the atime and mtime of path1 to be the same as that of path0 */#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#if defined(MSDOS) || defined(_WINDOWS)#include <io.h>#include <sys/utime.h>#else#include <utime.h>#include <unistd.h>#endif#include "shorten.h"#ifdef HAVE_CONFIG_H#include "config.h"#endifint dupfileinfo(path0, path1) char *path0, *path1; {  int errcode;  struct stat buf;  errcode = stat(path0, &buf);  if(!errcode) {    struct utimbuf ftime;    /* do what can be done, and igore errors */    (void) chmod(path1, buf.st_mode);    ftime.actime  = buf.st_atime;    ftime.modtime = buf.st_mtime;    (void) utime(path1, &ftime);#ifdef unix    (void) chown(path1, buf.st_uid, -1);    (void) chown(path1, -1, buf.st_gid);#endif  }  return(errcode);}#ifdef PROGTESTint main(int argc, char **argv) {  return(dupfileinfo(argv[1], argv[2]));}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -