SOL9 2.0 Sample: FolderWatcher

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * FolderWatcher.cpp 
 * Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9
// 2008/09/17
#include <sol\FolderWatcher.h>


// FolderWathcer sample program.
//
void _tmain(int argc, TCHAR* argv[]) {

    if (argc != 2) {
        _tprintf(_T("FolderWatcher.exe folder\n"));
        return;
    }
    try {
        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: 11 Nov 2009

Copyright (c) 2009 Antillia.com ALL RIGHTS RESERVED.