IFileNames Interface

Provides access to members that control an array of filenames.

Members

Name Description
Method Add Adds a filename to the array.
Method IsDirectory Indicates if the current filename is a directory.
Method Next Obtains the next filename in the array.
Method Remove Removes the current filename from the array.
Method Reset Resets the current position back to the beginning of the array.

IFileNames.Add Method

Adds a filename to the array.

Public Sub Add ( _
    ByVal FileName As String _
)
public void Add (
    string FileName
);

Description

The Add method adds the specified file name to the end of the array as a full path string. The path can refer to a directory or a file. Use the IsDirectory method to determine with the path specifies a directory or file.

IFileNames.IsDirectory Method

Indicates if the current filename is a directory.

Public Function IsDirectory ( _
) As Boolean
public bool IsDirectory (
);

Description

Indicates whether the current file name in the array is a directory or a file.

IFileNames.Next Method

Obtains the next filename in the array.

Public Function Next ( _
) As String
public string Next (
);

Description

Returns the current file name in the array as a full path string.

The Next method will return a zero-length string when it reaches the end of the array. Use the Reset method to go back to the beginning of the array to gain sequential access to the file names.

IFileNames.Remove Method

Removes the current filename from the array.

Public Sub Remove ( _
)
public void Remove (
);

Description

Removes the current file name in the array from the array.

Remarks

The Remove method cannot be called right after the Reset method. First point to an element in array by calling the Next method, and the Remove method can be used after that.

IFileNames.Reset Method

Resets the current position back to the beginning of the array.

Public Sub Reset ( _
)
public void Reset (
);

Description

The Reset method resets the array so that the next call to the Next method returns the first file name in the array.

Classes that implement IFileNames

Classes Description
FileNames FileNames object maintains an array of file paths.

Remarks

IFileNames offers only sequential access to the array. The file names are added to the array as full paths strings. The paths can refer to folders as well as files.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.