如何确定Windows中的文件的创建日期? [英] How can I determine a file's creation date in Windows?
本文介绍了如何确定Windows中的文件的创建日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能创建一个文件时的日期?我运行Windows。
How can I get the date of when a file was created? I am running Windows.
推荐答案
使用统计功能
请参见这里
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
struct tm* clock; // create a time structure
struct stat attrib; // create a file attribute structure
stat("afile.txt", &attrib); // get the attributes of afile.txt
clock = gmtime(&(attrib.st_mtime)); // Get the last modified time and put it into the time structure
这篇关于如何确定Windows中的文件的创建日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文