This document is archived and information here might be outdated.  Recommended version.


IWorkspaceFactory.GetWorkspaceName Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IW > IWorkspaceFactory Interface > IWorkspaceFactory.GetWorkspaceName Method
ArcGIS Developer Help

IWorkspaceFactory.GetWorkspaceName Method

Retrieves the workspace name of a workspace from the given list of file names.

[Visual Basic .NET]
Public Function GetWorkspaceName ( _
    ByVal parentDirectory As String, _
    ByVal fileNames As IFileNames _
) As IWorkspaceName
[C#]
public IWorkspaceName GetWorkspaceName (
    string parentDirectory,
    IFileNames fileNames
);
[C++]
HRESULT GetWorkspaceName(
  BSTR parentDirectory,
  IFileNames* fileNames
);
[C++]
Parameters
parentDirectory [in]

parentDirectory is a parameter of type BSTR fileNames [in]
fileNames is a parameter of type IFileNames*

Product Availability

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

Remarks

GetWorkspaceName is useful when browsing the file system for workspaces. It is handed in a parent directory and the list of file names in the directory to be examined. It returns a WorkspaceName object representing the first workspace it finds in the list of filenames and removes any filenames representing the workspace from the input list of filenames.

See Also

IWorkspaceFactory Interface