ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Data Namespace / FileGeodatabaseConnectionPath Class
Members Example Version

FileGeodatabaseConnectionPath Class
Represents the physical path to a file geodatabase folder that ends with the .gdb extension.
Syntax
public sealed class FileGeodatabaseConnectionPath : Connector 
Example
Creating a File Geodatabase
public void CreateFileGeodatabaseSnippet()
{
  // Create a FileGeodatabaseConnectionPath with the name of the file geodatabase you wish to create
  FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath =
    new FileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-File-Geodatabase\YourName.gdb"));

  // Create and use the file geodatabase
  using (Geodatabase geodatabase =
    SchemaBuilder.CreateGeodatabase(fileGeodatabaseConnectionPath))
  {
    // Create additional schema here
  }
}
Deleting a File Geodatabase
public void DeleteFileGeodatabaseSnippet()
{
  // Create a FileGeodatabaseConnectionPath with the name of the file geodatabase you wish to delete
  FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-File-Geodatabase\YourName.gdb"));

  // Delete the file geodatabase
  SchemaBuilder.DeleteGeodatabase(fileGeodatabaseConnectionPath);
}
Inheritance Hierarchy

System.Object
   ArcGIS.Core.Data.Connector
      ArcGIS.Core.Data.FileGeodatabaseConnectionPath

Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.0 or higher.
See Also