Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

WIN32_FILE_ATTRIBUTE_DATA structure (fileapi.h)

  • 2024-02-22
Feedback

In this article

Contains attribute information for a file or directory. TheGetFileAttributesEx function uses thisstructure.

Syntax

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, seeFile Attribute Constants.

ftCreationTime

AFILETIME structure that specifies when the file ordirectory is created.

If the underlying file system does not support creation time, this member is zero.

ftLastAccessTime

AFILETIME 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.

ftLastWriteTime

AFILETIME 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-orderDWORD of the file size.

This member does not have a meaning for directories.

nFileSizeLow

The low-orderDWORD 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 thesame manner. For example, on the FAT file system, create time has a resolution of 10 milliseconds, write time hasa resolution of 2 seconds, and access time has a resolution of 1 day. On the NTFS filesystem, access time has a resolution of 1 hour. For more information, seeFile Times.

Requirements

RequirementValue
Minimum supported clientWindows XP [desktop apps only]
Minimum supported serverWindows Server 2003 [desktop apps only]
Headerfileapi.h (include Windows.h, WinBase.h)

See also

File Attribute Constants

GetFileAttributesEx


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo