dotless.Compiler.Watcher.SetupWatcher C# (CSharp) Method

SetupWatcher() private method

private SetupWatcher ( string inputFilePath ) : void
inputFilePath string
return void
        private void SetupWatcher(string inputFilePath)
        {
            var fileInfo = new FileInfo(inputFilePath);
            if (fileInfo.Directory == null)
                throw new IOException("File Path has no directory to watch");

            string directoryFullName = fileInfo.Directory.FullName;
            var fsWatcher = new FileSystemWatcher(directoryFullName, fileInfo.Name);
            fsWatcher.Changed += FsWatcherChanged;
            fsWatcher.EnableRaisingEvents = true;
        }