ACPAddIn.ThisAddIn.trackFile C# (CSharp) Method

trackFile() private method

private trackFile ( String filePath ) : void
filePath String
return void
        private void trackFile(String filePath)
        {
            int index = filePath.LastIndexOf("\\");
            String fileName = filePath.Substring(index + 1);
            String fileDirectory = filePath.Substring(0, index);

            // Track configuration file changes
            watchConfigFile = new FileSystemWatcher();
            watchConfigFile.Path = fileDirectory;
            watchConfigFile.Filter = fileName;
            watchConfigFile.Changed += new FileSystemEventHandler(OnConfigChange);
            watchConfigFile.EnableRaisingEvents = true;
            watchConfigFile.NotifyFilter = NotifyFilters.LastWrite;
        }