CSharpTest.Net
Add(String) Method
See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Utils Namespace > FileList Class > Add Method : Add(String) Method

fileOrDirectory

Glossary Item Box

Adds the specified file to the collection. If the item specified is a directory that directory will be crawled for files, and optionally (RecurseFolders) child directories. If the name part of the path contains wild-cards they will be considered throughout the folder tree, i.e: C:\Temp\*.tmp will yeild all files having an extension of .tmp. Again if RecurseFolders is true you will get all .tmp files anywhere in the C:\Temp folder.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Add( _
   ByVal fileOrDirectory As String _
) 
C# 
public void Add( 
   string fileOrDirectory
)

Parameters

fileOrDirectory

Exceptions

ExceptionDescription
System.ArgumentNullExceptionThe exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
System.IO.FileNotFoundExceptionThe exception that is thrown when an attempt to access a file that does not exist on disk fails.

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys