GetFileAttributesExFromAppW function (fileapifromapp.h)

Retrieves attributes for a specified file or directory. The behavior of this function is identical to GetFileAttributesEx, except that this function adheres to the Universal Windows Platform (UWP) app security model.

Syntax

WINSTORAGEAPI BOOL GetFileAttributesExFromAppW(
  LPCWSTR                lpFileName,
  GET_FILEEX_INFO_LEVELS fInfoLevelId,
  LPVOID                 lpFileInformation
) noexcept;

Parameters

lpFileName

The name of the file or directory.

For information about opting out of the MAX_PATH limitation without prepending "\\?\", see the "Maximum Path Length Limitation" section of Naming Files, Paths, and Namespaces for details.

fInfoLevelId

A class of attribute information to retrieve.

This parameter can be the following value from the GET_FILEEX_INFO_LEVELS enumeration.

Value Meaning
GetFileExInfoStandard The lpFileInformation parameter is a WIN32_FILE_ATTRIBUTE_DATA structure.

lpFileInformation

A pointer to a buffer that receives the attribute information.

The type of attribute information that is stored into this buffer is determined by the value of fInfoLevelId.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero (0). To get extended error information, call GetLastError.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1803
Header fileapifromapp.h

See also

Naming Files, Paths, and Namespaces

GetFileAttributesEx