The RePointFS Utilities Library provides a set of tools to facilitate common file system operations, including file downloads from Azure Blob Storage and saving file paths to a SQL Server database.
- Download files from Azure Blob Storage to a local directory.
- Save file paths to a SQL Server database table.
You can install the library via NuGet Package Manager:
Install-Package RePointFS --version 1.0.1
using FileSystemUtilities;
var localRootPath = @"C:\JHStorage";
var azureConnectionString = "your-azure-storage-connection-string";
var azureContainerName = "your-container-name";
// Create an instance of RePointFS Manager
var repointFS = new RePointFS(localRootPath, azureConnectionString, azureContainerName);
// Download all files from Azure Blob Storage to a local directory
await repointFS.DownloadAllFilesAsync(destinationDirectory);
using FileSystemUtilities;
var azureConnectionString = "your-azure-storage-connection-string";
var azureContainerName = "your-container-name";
var localRootPath = @"C:\JHStorage";
var sqlConnectionString = "your-sql-server-connection-string"; // Replace with your actual SQL Server connection string
// Create an instance of RePointDB Manager
var repointDB = new RepointDB(sqlConnectionString, azureConnectionString, azureContainerName);
// Save file paths to SQL Server database table
await fileSystemManager.DownloadAllFilesAsync("SampleTable", "ColumnName", localRootPath, true);
- localRootPath: The local directory where files will be downloaded.
- azureConnectionString: The connection string for Azure Blob Storage.
- azureContainerName: The name of the Azure Blob Storage container.
- connectionString: The connection string for the SQL Server database.
- tableName: The name of the table in the SQL Server database.
- columnName: The name of the column in the SQL Server database table where file paths will be saved.
- destinationDirectory: The destination directory for downloaded files.
Copyright (c) 2024 Joever Monceda
Linkedin: Joever Monceda
Medium: Joever Monceda
Twitter @_EthanHunt07