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.
#include <windows.h>
#include <iostream>
using namespace std;
void ScanDir(const char* dirname)
{
HANDLE h;
WIN32_FIND_DATA info;
string pat;
if (!dirname)
dirname = ".";
pat = dirname;
pat += "\\*.*";
if ((h=FindFirstFile(pat.c_str(),&info))
== INVALID_HANDLE_VALUE)
return;
do
{
if (info.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
{
if (strcmp(info.cFileName,".")
&& strcmp(info.cFileName,".."))
cout << "dir\t" << info.cFileName << endl;
else
; // . (this) and .. (parent) refs,
// not true subdirnames...
}
else // this is a file
cout << "file\t" << info.cFileName << endl;
} while (FindNextFile(h,&info));
if (GetLastError() != ERROR_NO_MORE_FILES)
cout << "*** Dir scan failed." << endl;
FindClose(h);
}