ArcGIS Pro 3.0 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 sealed class FileGeodatabaseConnectionPath : Connector 
    Public NotInheritable Class FileGeodatabaseConnectionPath 
       Inherits Connector
    Example
    Creating a File Geodatabase
    // 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
    // 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, Windows 8.1

    See Also