首页 > 代码库 > WIN32_FILE_ATTRIBUTE_DATA structure
WIN32_FILE_ATTRIBUTE_DATA structure
typedef struct _WIN32_FILE_ATTRIBUTE_DATA { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD nFileSizeHigh; DWORD nFileSizeLow; } WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;Members(成员参数)
- dwFileAttributes
The file system attribute information for a file or directory.
这是一个文件或者一个目录的系统属性消息。
For possible values and their descriptions, see File Attribute Constants.
- ftCreationTime
A FILETIME structure that specifies when the file or directory is created.
当一个文件或者目录被创建的时候,一个FILETIME结构会被确定。
If the underlying file system does not support creation time, this member is zero.
如果文件系统不支持创建时间,那么这个参数为0.
- ftLastAccessTime
A FILETIME structure.
For a file, the structure specifies when the file is last read from or written to.
对于一个文件,当第一次被读或者被写入时,这个结构会确定下来。
For a directory, the structure specifies when the directory is created.
对于路径,当这个路径被创建时,这个结构会被确定下来。
For both files and directories, the specified date is correct, but the time of day is always set to midnight. If the underlying file system does not support last access time, this member is zero.
对于文件和路径,这些确定的数据是正确的,但是每天的时间总是被设置在午夜。如果文件系统不支持最后访问时间,那么这个参数为0.
- ftLastWriteTime
A FILETIME structure.
For a file, the structure specifies when the file is last written to.
For a directory, the structure specifies when the directory is created.
If the underlying file system does not support last write time, this member is zero.
- nFileSizeHigh
The high-order DWORD of the file size.
This member does not have a meaning for directories.
- nFileSizeLow
The low-order DWORD of the file size.
This member does not have a meaning for directories.
Remarks
Not all file systems can record creation and last access time, and not all file systems record them in the same manner. For example, on the FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day. On the NTFS file system, access time has a resolution of 1 hour. For more information, see File Times.
不是所有的操作系统可以记录创建和访问时间,并且不是所有的文件系统可以记录这些时间在相同的方式下。例如:在FAT文件系统下,创建时间还有一个10毫秒的决定时间,写入时间有2秒的决定时间,访问时间会有一天的决定时间。在NTFS文件系统,访问时间有1小时的决定时间。
WIN32_FILE_ATTRIBUTE_DATA structure