WilliamCalm
Programmer
hi friends, I wish to know which API function does the job of show and hide the hidden files and directories. I would be very much appriciate if a simple example is also provides. Thanks a lot
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
char fname[10] = "test.txt";
DWORD dwFileAttributes;
// the following removes the hidden attribute
dwFileAttributes = GetFileAttributes((LPCSTR) fname);
dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN;
SetFileAttributes((LPCSTR) fname,dwFileAttributes);
// the following sets the hidden attribute
dwFileAttributes = GetFileAttributes((LPCSTR) fname);
dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
SetFileAttributes((LPCSTR) fname,dwFileAttributes);