Git Product home page Git Product logo

dropbear.codex.files's Introduction

DropBear.Codex.Files

DropBear.Codex.Files is a .NET library designed to enhance file management capabilities, tailored specifically for applications that require robust handling of file operations. This includes streamlined processes for reading, writing, and updating files both locally and in blob storage, with an emphasis on performance and flexibility.

Features

  • Advanced File Operations: Supports advanced file operations such as reading, writing, updating (with and without deltas), and deleting files across different storage strategies.
  • Storage Strategy Flexibility: Incorporates a strategy pattern to allow operations to seamlessly switch between local file systems and blob storage, or use both concurrently.
  • Memory Efficiency: Utilizes RecyclableMemoryStreamManager for improved memory management, reducing large object heap (LOH) fragmentation.
  • Extensible Architecture: The use of factory and builder patterns facilitates easy customization and extension of storage manager functionalities.

Getting Started

Installation

To use DropBear.Codex.Files in your project, add the library via NuGet:

dotnet add package DropBear.Codex.Files

Usage

Here is a quickstart guide on using the library to manage files effectively:

// Initialize the FileManager with a specific storage strategy
var fileManager = new FileManagerBuilder()
    .WithMemoryStreamManager(new RecyclableMemoryStreamManager())
    .WithLocalStorage("C:\\Data")  // Optional: Configure local storage
    .WithBlobStorage("accountName", "accountKey", "containerName")  // Optional: Configure blob storage
    .SetStorageStrategy(StorageStrategy.Both)  // Choose storage strategy: BlobOnly, LocalOnly, or Both
    .Build();

// Use FileManager to write, read, update, and delete files
// Example code to write a file
fileManager.WriteToFileAsync(dropBearFile, "path/to/file").Wait();

Contribution

Contributions are welcome! If you have suggestions or want to contribute code, please feel free to create issues or pull requests on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.


dropbear.codex.files's People

Contributors

tkuchel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.