Soenneker.Utils.FileSync 4.0.1995

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.1995
                    
NuGet\Install-Package Soenneker.Utils.FileSync -Version 4.0.1995
                    
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.1995" />
                    
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.1995" />
                    
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.1995
                    
#r "nuget: Soenneker.Utils.FileSync, 4.0.1995"
                    
#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.1995
                    
#: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.1995
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.FileSync&version=4.0.1995
                    
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.2008 0 8/31/2026
4.0.2007 31 8/31/2026
4.0.2006 26 8/31/2026
4.0.2005 34 8/30/2026
4.0.2004 30 8/30/2026
4.0.2003 102 8/30/2026
4.0.2002 37 8/30/2026
4.0.2001 37 8/30/2026
4.0.2000 38 8/30/2026
4.0.1998 35 8/30/2026
4.0.1997 36 8/30/2026
4.0.1996 41 8/29/2026
4.0.1995 37 8/29/2026
4.0.1993 36 8/29/2026
4.0.1992 70 8/26/2026
4.0.1991 70 8/26/2026
4.0.1990 71 8/26/2026
4.0.1989 79 8/25/2026
4.0.1988 97 8/22/2026
4.0.1987 89 8/22/2026
Loading failed

Update dependency Soenneker.Utils.Directory to 4.0.903 (#2673)