Platform SDK: Files and I/O |
The GetFileAttributesEx function retrieves attributes for a specified file or directory.
BOOL GetFileAttributesEx( LPCTSTR lpFileName, // file or directory name GET_FILEEX_INFO_LEVELS fInfoLevelId, // attribute LPVOID lpFileInformation // attribute information );
Windows NT/2000: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see File Name Conventions.
Windows 98: This string must not exceed MAX_PATH characters.
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The GetFileAttributes function retrieves a set of FAT-style attribute information. GetFileAttributesEx can obtain other sets of file or directory attribute information. Currently, GetFileAttributeEx retrieves a set of standard attributes that is a superset of the FAT-style attribute information.
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 98.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
File I/O Overview, File I/O Functions, GetFileAttributes, GET_FILEEX_INFO_LEVELS, SetFileAttributes