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.2010 80 9/1/2026
4.0.2009 74 8/31/2026
4.0.2008 71 8/31/2026
4.0.2007 83 8/31/2026
4.0.2006 72 8/31/2026
4.0.2005 78 8/30/2026
4.0.2004 74 8/30/2026
4.0.2003 144 8/30/2026
4.0.2002 82 8/30/2026
4.0.2001 80 8/30/2026
4.0.2000 79 8/30/2026
4.0.1998 80 8/30/2026
4.0.1997 80 8/30/2026
4.0.1996 82 8/29/2026
4.0.1995 78 8/29/2026
4.0.1993 76 8/29/2026
4.0.1992 82 8/26/2026
4.0.1991 85 8/26/2026
4.0.1990 88 8/26/2026
4.0.1989 94 8/25/2026
Loading failed

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