private static void Startup() { //If directory doesn't exist, throw an error //@TODO: Add Logging if (!Directory.Exists(Data.FileSystem.WatchPath)) { throw new IOException(); } //If directory does exist, initialize watcher _watcher = new FileSystemWatcher { Path = Data.FileSystem.WatchPath, IncludeSubdirectories = true, NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size, Filter = "*.*" }; //Set event delegates _watcher.Changed += OnChanged; _watcher.Renamed += OnRenamed; //Start watching _watcher.EnableRaisingEvents = true; //Initialize queue client _queueClient = AwsQueueClient.GetInstance(); //Initialize File Structure _fileStructure = new AwsFileStructure(); }