Linger.FileSystem 0.3.1-alpha

This is a prerelease version of Linger.FileSystem.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Linger.FileSystem --version 0.3.1-alpha
                    
NuGet\Install-Package Linger.FileSystem -Version 0.3.1-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Linger.FileSystem" Version="0.3.1-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Linger.FileSystem" Version="0.3.1-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Linger.FileSystem" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Linger.FileSystem --version 0.3.1-alpha
                    
#r "nuget: Linger.FileSystem, 0.3.1-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Linger.FileSystem@0.3.1-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Linger.FileSystem&version=0.3.1-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Linger.FileSystem&version=0.3.1-alpha&prerelease
                    
Install as a Cake Tool

Linger.FileSystem

Overview

Linger.FileSystem is a feature-rich C# file system helper library that provides a set of tools to simplify file and directory operations. The library aims to make developers more efficient in handling file system related tasks, including file upload and download.

Table of Contents

Features

  • Simplified file operation APIs
  • Secure file read/write functionality
  • Path processing utilities
  • Cross-platform compatibility
  • Asynchronous file operation support
  • File upload and download capabilities

Supported .NET Versions

This library supports the following .NET applications:

  • .NET Framework 4.6.2+
  • .NET Standard 2.0+
  • .NET Core 2.0+/.NET 5+

Installation

Install via NuGet Package Manager:

Install-Package Linger.FileSystem

Or using .NET CLI:

dotnet add package Linger.FileSystem

Usage Examples

using Linger.FileSystem;

// Basic file operations
var fileHelper = new FileHelper();
await fileHelper.WriteTextAsync("path/to/file.txt", "Hello World!");
var content = await fileHelper.ReadTextAsync("path/to/file.txt");

// Directory operations
var dirHelper = new DirectoryHelper();
dirHelper.CreateDirectory("path/to/directory");
var files = dirHelper.GetFiles("path/to/directory", "*.txt");

// LocalFileSystem operations
var localFS = new LocalFileSystem();
// Create and write to a file
await localFS.WriteAllTextAsync("local/path/to/file.txt", "Content to write");
// Check if file exists
bool exists = await localFS.FileExistsAsync("local/path/to/file.txt");
Console.WriteLine($"File exists: {exists}");
// Read file content
string fileContent = await localFS.ReadAllTextAsync("local/path/to/file.txt");
Console.WriteLine(fileContent);
// Copy file
await localFS.CopyAsync("source/file.txt", "destination/file.txt", true);
// Delete file
await localFS.DeleteFileAsync("local/path/to/file.txt");

// Upload and Download operations with LocalFileSystem
// Upload a file to a remote server
using (var fileStream = File.OpenRead("local/file/path.txt"))
{
    await localFS.UploadAsync(fileStream, "remote/destination/path.txt");
}

// Download a file from a remote server
await localFS.DownloadAsync("remote/source/file.txt", "local/destination/file.txt");

// Stream-based download
using (var destinationStream = File.Create("local/path/downloaded.file"))
{
    await localFS.DownloadToStreamAsync("remote/path/file", destinationStream);
}

Contributing

Pull requests and issues are welcome to help us improve this library.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Linger.FileSystem:

Package Downloads
Linger.FileSystem.Sftp

An SFTP implementation of the Linger FileSystem abstraction. Provides a secure file transfer protocol client using SSH.NET for file operations. Supports both password and certificate-based authentication with configurable retry capabilities.

Linger.FileSystem.Ftp

An FTP implementation of the Linger FileSystem abstraction. Provides a robust and retry-capable FTP client for file operations using FluentFTP. Supports common file system operations such as uploading, downloading, listing, and deleting files.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview2 118 11/6/2025
1.0.0-preview1 119 11/5/2025
0.9.9 236 10/16/2025
0.9.8 236 10/14/2025
0.9.7-preview 225 10/13/2025
0.9.6-preview 209 10/12/2025
0.9.5 219 9/28/2025
0.9.4-preview 248 9/25/2025
0.9.3-preview 272 9/22/2025
0.9.1-preview 371 9/16/2025
0.9.0-preview 189 9/12/2025
0.8.5-preview 257 8/31/2025
0.8.4-preview 375 8/25/2025
0.8.3-preview 238 8/20/2025
0.8.2-preview 236 8/4/2025
0.8.1-preview 171 7/30/2025
0.8.0-preview 616 7/22/2025
0.7.2 250 6/3/2025
0.7.1 249 5/21/2025
0.7.0 254 5/19/2025
0.6.0-alpha 255 4/28/2025
0.5.0-alpha 254 4/10/2025
0.4.0-alpha 246 4/1/2025
0.3.3-alpha 258 3/19/2025
0.3.2-alpha 243 3/17/2025
0.3.1-alpha 225 3/16/2025
0.3.0-alpha 317 3/6/2025
0.2.0-alpha 216 2/9/2025
0.1.2-alpha 150 12/17/2024
0.1.1-alpha 157 12/17/2024
0.1.0-alpha 159 12/6/2024
0.0.4-alpha 123 12/6/2024
0.0.3-alpha 177 8/9/2024
0.0.2-alpha 134 8/9/2024
0.0.1-alpha 123 8/7/2024