SOL9 Sample: FolderWatcher
|
1 Screenshot
2 Source code
/*
* FolderWatcher.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2008/09/17
#include <sol\FolderWatcher.h>
//2011/09/04 Added the following line.
#include <sol\Locale.h>
// FolderWathcer sample program.
//
void _tmain(int argc, TCHAR* argv[]) {
if (argc != 2) {
_tprintf(_T("FolderWatcher.exe folder\n"));
return;
}
try {
//2011/09/04 Added the following line.
Locale locale;
int secs = 30;
_tprintf(_T("Create a FolderWatcher for folder=%s, runs only %d(secs)\n\n"), argv[1], secs);
FolderWatcher watcher(argv[1]);
watcher.start();
Sleep(1000*secs);
watcher.stop();
watcher.wait();
_tprintf(_T("\nTerminated\n"));
Sleep(1000);
} catch (...) {
_tprintf(_T("Exception \n"));
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.