Skip to content

Ethan0007/RePointFS

Repository files navigation

NuGet Downloads NuGet Version

RePointFS : Simplify File Management

RePoint

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.

Features

  • Download files from Azure Blob Storage to a local directory.
  • Save file paths to a SQL Server database table.

Installation

You can install the library via NuGet Package Manager:

 Install-Package RePointFS --version 1.0.1

Architecture

RePoint

Usage

Downloading Files from Azure Blob Storage

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);

Saving File Paths to SQL Server Database

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);

Configuration

  • 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.

License

License: MIT
Copyright (c) 2024 Joever Monceda

Linkedin: Joever Monceda
Medium: Joever Monceda
Twitter @_EthanHunt07

About

Local & Azure File System Utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages