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

In This Topic
    FileGeodatabaseConnectionPath Class
    In This Topic
    Represents the physical path to a file geodatabase folder that ends with the .gdb extension.
    Syntax
    Public NotInheritable Class FileGeodatabaseConnectionPath 
       Inherits Connector
    public sealed class FileGeodatabaseConnectionPath : Connector 
    Example
    Creating a File Geodatabase
    {
      await QueuedTask.Run(() =>
      {
        // 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
    {
      await QueuedTask.Run(() =>
      {
        // 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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also