Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.11 KB

GetFileAttributes.md

File metadata and controls

48 lines (32 loc) · 1.11 KB

Home

Function name : GetFileAttributes

Group: File Management - Library: kernel32


Retrieves attributes for a specified file or directory.


Code examples:

How to test file attributes (key method for FileExists and DirectoryExists routines)
Changing file attributes

Declaration:

DWORD GetFileAttributes(
  LPCTSTR lpFileName   // name of file or directory
);  

FoxPro declaration:

DECLARE INTEGER GetFileAttributes IN kernel32;
	STRING lpFileName  

Parameters:

lpFileName [in] Pointer to a null-terminated string that specifies the name of a file or directory.


Return value:

If the function succeeds, the return value contains the attributes of the specified file or directory.


Comments:

This function can be used for testing an access to a directory -- a key-turn DirectoryExists function.