| Visual Basic (Declaration) | |
|---|---|
Public Shared Function TrySearchPath( _ ByVal location As String, _ ByRef fullPath As String _ ) As Boolean | |
Parameters
- location
- fullPath
Library/Library.Test/TestFileUtils.cs
| C# | Copy Code |
|---|---|
string found, test; test = @"C:\This file hopefully doesn't exist on your hard drive!"; Assert.IsFalse(File.Exists(test)); Assert.IsFalse(FileUtils.TrySearchPath(test, out found)); test = @"*<Illegal File Name?>*"; Assert.IsFalse(FileUtils.TrySearchPath(test, out found)); test = @"*"; //<= wild-cards not allowed. Assert.IsFalse(FileUtils.TrySearchPath(test, out found)); test = @"????????.???"; //<= wild-cards not allowed. Assert.IsFalse(FileUtils.TrySearchPath(test, out found)); | |
| VB.NET | Copy Code |
|---|---|
Dim found As String, test As String test = "C:\This file hopefully doesn't exist on your hard drive!" Assert.IsFalse(File.Exists(test)) Assert.IsFalse(FileUtils.TrySearchPath(test, found)) test = "*<Illegal File Name?>*" Assert.IsFalse(FileUtils.TrySearchPath(test, found)) test = "*" '<= wild-cards not allowed. Assert.IsFalse(FileUtils.TrySearchPath(test, found)) test = "????????.???" '<= wild-cards not allowed. Assert.IsFalse(FileUtils.TrySearchPath(test, found)) | |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
FileUtils ClassFileUtils Members