CClash.DirectCompilerCacheServer.UnwatchFile C# (CSharp) Method

UnwatchFile() public method

public UnwatchFile ( string path ) : void
path string
return void
        public void UnwatchFile(string path)
        {
            var dir = Path.GetDirectoryName(path);
            DirectoryWatcher w;

            if (dwatchers.TryGetValue(dir, out w))
            {
                var file = Path.GetFileName(path);
                w.UnWatch(file);
                if (w.Files.Count == 0)
                {
                    dwatchers.Remove(dir);
                    w.Dispose();
                }
            }
        }