Parameters
- path
Library/Library.Test/TestTempFiles.cs
C# | Copy Code |
---|---|
TempFile file = new TempFile(); Assert.IsTrue(File.Exists(file.TempPath)); TempFile.Delete(file.TempPath); Assert.IsFalse(File.Exists(file.TempPath)); file.Dispose(); //ignres bad paths: TempFile.Delete("@~+_(!&($_~!(&*+_~&^%^|||&&&\\\\ THIS IS AN INVALID FILE NAME.*"); |
VB.NET | Copy Code |
---|---|
Dim file As New TempFile() Assert.IsTrue(File.Exists(file.TempPath)) TempFile.Delete(file.TempPath) Assert.IsFalse(File.Exists(file.TempPath)) file.Dispose() 'ignres bad paths: TempFile.Delete("@~+_(!&($_~!(&*+_~&^%^|||&&&\\ THIS IS AN INVALID FILE NAME.*") |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7