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


IWorkspaceFactory.ContainsWorkspace Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabase)  

IWorkspaceFactory.ContainsWorkspace Method

Indicates if parentDirectory contains a valid workspace, or is a valid file-system workspace.

[Visual Basic .NET]
Public Function ContainsWorkspace ( _
    ByVal parentDirectory As String, _
    ByVal fileNames As IFileNames _
) As Boolean
[C#]
public bool ContainsWorkspace (
    string parentDirectory,
    IFileNames fileNames
);
[C++]
HRESULT ContainsWorkspace(
  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

ContainsWorkspace is useful when browsing the file system for workspaces. It takes a parent directory and the list of file names in the directory to be examined. It returns true if the parent directory represents a workspace covered by this factory or if the parent directory contains a workspace or a connection file to a workspace covered by this factory.

See Also

IWorkspaceFactory Interface