|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.FileNames
public class FileNames
FileNames object maintains an array of file paths.
The FileNames object is used by several interfaces including IWorkspaceFactory and IGxObjectFactory to determine whether a set of files conform to a particular data source.
FileNames offers some advanced file-specific array methods through its IFileNames2 interface.
The FileNames object is not associated with the FileName object which performs a specific role as a Name object.
Constructor Summary | |
---|---|
FileNames()
Constructs a FileNames using ArcGIS Engine. |
|
FileNames(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. FileNames theFileNames = (FileNames) obj; |
Method Summary | |
---|---|
void |
add(String fileName)
Adds a filename to the array. |
boolean |
equals(Object o)
Compare this object with another |
boolean |
find(String fileName)
Advances the current postion to the specified file if it exists. |
static String |
getClsid()
getClsid. |
String |
getContainedExtensions()
Obtains a delimited set of extensions contained within the collection. |
IFileNames |
getSubset(String extSet)
Obtains a subset based on a delimited set of extensions. |
int |
hashCode()
the hashcode for this object |
boolean |
isDirectory()
Indicates if the current filename is a directory. |
void |
loadFromPath(String path)
Loads the collection with files from the specified path. |
String |
next()
Obtains 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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public FileNames() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic FileNames(Object obj) throws IOException
FileNames theFileNames = (FileNames) obj;
obj
to FileNames
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void add(String fileName) throws IOException, AutomationException
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.
add
in interface IFileNames
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remove() throws IOException, AutomationException
Removes the current file name in the array from the array.
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.
remove
in interface IFileNames
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void reset() throws IOException, AutomationException
The Reset method resets the array so that the next call to the Next method returns the first file name in the array.
reset
in interface IFileNames
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String next() throws IOException, AutomationException
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.
next
in interface IFileNames
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDirectory() throws IOException, AutomationException
Indicates whether the current file name in the array is a directory or a file.
isDirectory
in interface IFileNames
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void loadFromPath(String path) throws IOException, AutomationException
The LoadFromPath method adds any file names to the array (both directories and files) that are found in the specified directory path.
loadFromPath
in interface IFileNames2
path
- The path (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFileNames getSubset(String extSet) throws IOException, AutomationException
The GetSubset method returns a FileNames object consisting of a subset of the file names in the array that have the specified extension.
getSubset
in interface IFileNames2
extSet
- The extSet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getContainedExtensions() throws IOException, AutomationException
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.
getContainedExtensions
in interface IFileNames2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean find(String fileName) throws IOException, AutomationException
Indicates whether the specified file name exists in the array.
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.
find
in interface IFileNames2
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |