Provides access to retrieve subsets based on extension.
Description
The IFileNames2 interface provides advanced file-specific array methods.
Members
Name | Description | |
---|---|---|
![]() |
Find | Advances the current postion to the specified file if it exists. |
![]() |
GetContainedExtensions | Obtains a delimited set of extensions contained within the collection. |
![]() |
GetSubset | Obtains a subset based on a delimited set of extensions. |
![]() |
LoadFromPath | Loads the collection with files from the specified path. |
IFileNames2.Find Method
Advances the current postion to the specified file if it exists.
Public Function Find ( _
ByVal FileName As String _
) As Boolean
public bool Find (
string FileName
);
Description
Indicates whether the specified file name exists in the array.
Remarks
If the array contains a file name which is a directory path, the Find method returns False (not found) if the directory path was passed to be searched. The Find method searches only for files.
IFileNames2.GetContainedExtensions Method
Obtains a delimited set of extensions contained within the collection.
Public Function GetContainedExtensions ( _
) As String
public string GetContainedExtensions (
);
Description
The GetContainedExtensions method returns a delimited string containing the file name extensions within the array. For example, "txt|shp".
If the array contains a file name which is a directory, "<dir>" is returned. For example, "txt|<dir>|shp". Use the IFileNames::IsDirectory method to determine if a file name is a directory or a file.
IFileNames2.GetSubset Method
Obtains a subset based on a delimited set of extensions.
Public Function GetSubset ( _
ByVal extSet As String _
) As IFileNames
public IFileNames GetSubset (
string extSet
);
Description
The GetSubset method returns a FileNames object consisting of a subset of the file names in the array that have the specified extension.
IFileNames2.LoadFromPath Method
Loads the collection with files from the specified path.
Public Sub LoadFromPath ( _
ByVal Path As String _
)
public void LoadFromPath (
string Path
);
Description
The LoadFromPath method adds any file names to the array (both directories and files) that are found in the specified directory path.
Classes that implement IFileNames2
Classes | Description |
---|---|
FileNames | FileNames object maintains an array of file paths. |