com.esri.arcgis.system
Interface IFileNames

All Superinterfaces:
Serializable
All Known Implementing Classes:
FileNames

public interface IFileNames
extends Serializable

Provides access to members that control an array of filenames.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void add(String fileName)
          Adds a filename to the array.
 boolean isDirectory()
          Indicates if the current filename is a directory.
 String next()
          Returns the next filename in the array.
 void remove()
          Removes the current filename from the array.
 void reset()
          Resets the current position back to the beginning of the array.
 

Method Detail

add

void add(String fileName)
         throws IOException,
                AutomationException
Adds a filename to the array.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

void remove()
            throws IOException,
                   AutomationException
Removes the current filename from the array.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

void reset()
           throws IOException,
                  AutomationException
Resets the current position back to the beginning of the array.

Description

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

next

String next()
            throws IOException,
                   AutomationException
Returns the next filename in the array.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The fileName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirectory

boolean isDirectory()
                    throws IOException,
                           AutomationException
Indicates if the current filename is a directory.

Description

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The isDirectory
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.