Parameters
- path
Library/Library.Test/TestTempFiles.cs
C# | Copy Code |
---|---|
string path = new TempDirectory().Detatch(); using (Stream io = File.Create(Path.Combine(path, "temp"))) TempDirectory.Delete(path); Assert.IsTrue(Directory.Exists(path)); GC.Collect(0, GCCollectionMode.Forced); GC.WaitForPendingFinalizers(); Assert.IsFalse(Directory.Exists(path)); |
VB.NET | Copy Code |
---|---|
Dim path As String = New TempDirectory().Detatch() Using io As Stream = File.Create(Path.Combine(path, "temp")) TempDirectory.Delete(path) End Using Assert.IsTrue(Directory.Exists(path)) GC.Collect(0, GCCollectionMode.Forced) GC.WaitForPendingFinalizers() Assert.IsFalse(Directory.Exists(path)) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
TempDirectory ClassTempDirectory Members
Overload List