From 1f837afadc1be716347d24387b7cd590fe0ec457 Mon Sep 17 00:00:00 2001 From: Alexander Lazarenko Date: Wed, 28 May 2025 13:19:57 +0300 Subject: [PATCH] Refactor OpenFunc call to use deferred execution --- api.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api.go b/api.go index 28ebdca..9299bdb 100644 --- a/api.go +++ b/api.go @@ -143,6 +143,18 @@ func New(options AgateOptions) (*Agate, error) { return agate, nil } +func (a *Agate) GetActiveDir() string { + return a.options.BlobStore.GetActiveDir() +} + +func (a *Agate) GetMetadataDir() string { + return a.metadataDir +} + +func (a *Agate) GetBlobsDir() string { + return a.blobsDir +} + // SaveSnapshot creates a new snapshot from the current state of the active directory. // If parentID is provided, it will be set as the parent of the new snapshot. // If parentID is empty, it will use the ID of the snapshot currently loaded in the active directory.