Soenneker.Utils.Directory
4.0.907
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Utils.Directory --version 4.0.907
NuGet\Install-Package Soenneker.Utils.Directory -Version 4.0.907
<PackageReference Include="Soenneker.Utils.Directory" Version="4.0.907" />
<PackageVersion Include="Soenneker.Utils.Directory" Version="4.0.907" />
<PackageReference Include="Soenneker.Utils.Directory" />
paket add Soenneker.Utils.Directory --version 4.0.907
#r "nuget: Soenneker.Utils.Directory, 4.0.907"
#:package Soenneker.Utils.Directory@4.0.907
#addin nuget:?package=Soenneker.Utils.Directory&version=4.0.907
#tool nuget:?package=Soenneker.Utils.Directory&version=4.0.907
Soenneker.Utils.Directory
A utility library encapsulating various directory methods.
Installation
dotnet add package Soenneker.Utils.Directory
Quick start
using Soenneker.Utils.Directory.Registrars;
services.AddDirectoryUtilAsSingleton();
Then inject IDirectoryUtil wherever you need it.
Common operations
GetAllDirectories()- Retrieves all immediate subdirectories in the specified directory.GetAllAsEnumerable()- Retrieves all immediate subdirectories as a list.GetAllDirectoriesRecursively()- Retrieves all subdirectories recursively from the specified directory.GetAllRecursivelyAsEnumerable()- Retrieves all subdirectories recursively as a list.Delete()- Deletes the specified directory and all its contents.DeleteIfExists()- Deletes the directory if it exists.Create()- Creates the directory if it does not exist. Returns true if the directory was created, false if it already existed.TryCreate()- Attempts to create the specified directory.CreateStrict()- Creates the specified directory and throws if it already exists.GetWorkingDirectory()- Gets the working directory of the currently executing assembly.GetDirectoriesOrderedByLevels()- Retrieves a list of directories ordered by their levels. Avoids Split() allocations by counting separators.GetNewTempDirectoryPath()- Generates a new temporary directory path, but does not actually create the directory.
The package also includes 12 additional operations for more specialized cases.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Soenneker.Extensions.Task (>= 4.0.127)
- Soenneker.Utils.Path (>= 4.0.1200)
NuGet packages (19)
Showing the top 5 NuGet packages that depend on Soenneker.Utils.Directory:
| Package | Downloads |
|---|---|
|
Soenneker.Utils.FileSync
A utility library encapsulating synchronous file IO operations |
|
|
Soenneker.Utils.Dotnet
A utility library for the dotnet executable |
|
|
Soenneker.Utils.SHA3
A utility library for SHA-3 hashing |
|
|
Soenneker.Hashing.Blake3
A high-performance .NET library for BLAKE3 hashing and constant-time verification. Pure C# with optional SIMD acceleration (AVX2 on x64, NEON on ARM). |
|
|
Soenneker.OpenApi.Fixer
Normalizes OpenAPI documents for generated-client compatibility |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.944 | 5,542 | 9/16/2026 |
| 4.0.943 | 149 | 9/16/2026 |
| 4.0.942 | 98 | 9/16/2026 |
| 4.0.941 | 139 | 9/15/2026 |
| 4.0.939 | 10,454 | 9/13/2026 |
| 4.0.938 | 742 | 9/13/2026 |
| 4.0.937 | 1,719 | 9/13/2026 |
| 4.0.936 | 3,698 | 9/12/2026 |
| 4.0.935 | 3,673 | 9/12/2026 |
| 4.0.934 | 1,654 | 9/12/2026 |
| 4.0.933 | 130 | 9/12/2026 |
| 4.0.930 | 10,865 | 9/9/2026 |
| 4.0.929 | 2,971 | 9/9/2026 |
| 4.0.928 | 3,658 | 9/8/2026 |
| 4.0.927 | 6,499 | 9/8/2026 |
| 4.0.926 | 4,259 | 9/7/2026 |
| 4.0.925 | 3,005 | 9/7/2026 |
| 4.0.924 | 3,324 | 9/7/2026 |
| 4.0.923 | 13,656 | 9/5/2026 |
| 4.0.907 | 1,921 | 8/30/2026 |
Update dependency Soenneker.Utils.Path to 4.0.1200 (#1495)