Soenneker.Utils.FileSync 4.0.2001

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.FileSync --version 4.0.2001
                    
NuGet\Install-Package Soenneker.Utils.FileSync -Version 4.0.2001
                    
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="Soenneker.Utils.FileSync" Version="4.0.2001" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.FileSync" Version="4.0.2001" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.FileSync" />
                    
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 Soenneker.Utils.FileSync --version 4.0.2001
                    
#r "nuget: Soenneker.Utils.FileSync, 4.0.2001"
                    
#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 Soenneker.Utils.FileSync@4.0.2001
                    
#: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=Soenneker.Utils.FileSync&version=4.0.2001
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.FileSync&version=4.0.2001
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.FileSync

A utility library encapsulating synchronous file IO operations.

Installation

dotnet add package Soenneker.Utils.FileSync

Quick start

using Soenneker.Utils.FileSync.Registrars;

services.AddFileUtilSyncAsSingleton();

Then inject IFileUtilSync wherever you need it.

Common operations

  • GetTempFileName() - Returns a unique GUID path under the system temp directory without creating the file.
  • Read() - Reads all text from the specified file. Returns the file contents as a string.
  • ReadToBytes() - Reads all bytes from the specified file. Returns the file contents as a byte array.
  • ReadAsLines() - Reads all lines from the specified file. Returns a list of lines from the file.
  • WriteAllLines() - Writes the specified lines to a file.
  • Write() - Writes text content to a file.
  • Exists() - Determines whether the specified file exists.
  • Delete() - Deletes the specified file.
  • DeleteIfExists() - Deletes the file if it exists. Returns true if the file was deleted; otherwise, false.
  • TryDeleteIfExists() - Tries to delete the file if it exists, catching any exceptions. Returns true if the file was deleted; otherwise, false.
  • TryRemoveReadonlyAndArchiveAttributesFromAll() - Removes read-only and archive attributes from all files in a directory.
  • TryRemoveReadonlyAndArchiveAttribute() - Removes read-only and archive attributes from a single file. Returns true if attributes were removed; otherwise, false.

The package also includes 12 additional operations for more specialized cases.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.2024 0 9/9/2026
4.0.2023 0 9/8/2026
4.0.2022 41 9/8/2026
4.0.2021 43 9/8/2026
4.0.2020 48 9/7/2026
4.0.2019 53 9/7/2026
4.0.2018 50 9/7/2026
4.0.2017 53 9/5/2026
4.0.2016 49 9/4/2026
4.0.2015 47 9/4/2026
4.0.2014 55 9/4/2026
4.0.2013 51 9/4/2026
4.0.2012 47 9/4/2026
4.0.2011 49 9/4/2026
4.0.2010 99 9/1/2026
4.0.2009 84 8/31/2026
4.0.2008 80 8/31/2026
4.0.2007 91 8/31/2026
4.0.2006 80 8/31/2026
4.0.2001 89 8/30/2026
Loading failed

Update dependency Soenneker.Extensions.Stream to 4.0.143 (#2681)