CClash.FileCacheStore.Remove C# (CSharp) Method

Remove() public method

public Remove ( string key ) : void
key string
return void
        public void Remove(string key)
        {
            var p = MakePath(key);
            if (Directory.Exists(p))
            {
                int sz = 0;
                var di = new DirectoryInfo(p);
                foreach (var f in di.GetFiles())
                {
                    sz += (int)(f.Length / 1024);
                }
                Directory.Delete(MakePath(key), true);
                if (Removed != null)
                {
                    Removed(this, new FileCacheStoreRemovedEventArgs() { SizeKB = sz });
                }
            }
        }