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


IWorkspaceFactory.GetWorkspaceName Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

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,
  IWorkspaceName** WorkspaceName
);
[C++]

Parameters parentDirectory [in] parentDirectory is a parameter of type BSTR fileNames [in]
fileNames is a parameter of type IFileNames WorkspaceName [out, retval]
WorkspaceName is a parameter of type IWorkspaceName

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