SHARE
TWEET

Untitled

a guest Jun 15th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static FileSystemWatcher Watcher;
  2. private static bool IsStarting;
  3.  
  4. internal static void Start()
  5. {
  6.     if (IsStarting) return;
  7.     Watcher = new FileSystemWatcher(Boot.Folder)
  8.     {
  9.         EnableRaisingEvents = true,
  10.         IncludeSubdirectories = true
  11.     };
  12.     Watcher.Created += WatcherOnCreated;
  13.     IsStarting = true;
  14. }
  15.  
  16. private static void WatcherOnCreated(object sender, FileSystemEventArgs e)
  17. {
  18.      Logger.Write(e.FullPath);
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top