public void Dispose() { if(!string.IsNullOrEmpty(path)) { if(!string.IsNullOrEmpty(originalCurrentDir)) { Environment.CurrentDirectory = originalCurrentDir; } ClearDirectory(path); path = null; } }