/// <summary> /// Deletes the directory /// </summary> public override void Delete() { if (!Exists) { return; } foreach (IFile File in EnumerateFiles()) { File.Delete(); } foreach (IDirectory Directory in EnumerateDirectories()) { Directory.Delete(); } InternalDirectory.Delete(true); InternalDirectory.Refresh(); }
/// <summary> /// Deletes the directory /// </summary> public override IDirectory Delete() { if (!Exists) { return(this); } foreach (var TempFile in EnumerateFiles()) { TempFile.Delete(); } foreach (var TempDirectory in EnumerateDirectories()) { TempDirectory.Delete(); } InternalDirectory.Delete(true); InternalDirectory.Refresh(); return(this); }