void main()
{

        void dirWatcher()
        {
auto g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop());
                g_watcher.run({
                        DWChangeInfo[1] change;
                        DWChangeInfo[] changeRef = change.ptr[0..1];
                        while(g_watcher.readChanges(changeRef)){
                                writeln(change);
                        }
                });
                g_watcher.watchDir(".");
                getThreadEventLoop();
                
        }

dirWatcher();

//destroyAsyncThreads();

}
Is this code enough to monitoring folder?

If I run it it's terminating, it's seems that eventloop not starting or I placed it in wrong place?

Reply via email to