Skip to content

Commit

Permalink
Convert DirectoryExtensions methods to extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
FrediKats committed Mar 28, 2024
1 parent ae661ee commit 6ae2f23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup>
<RepositoryUrl>https://github.com/kysect/Kysect.CommonLib</RepositoryUrl>
<PackageProjectUrl>https://github.com/kysect/Kysect.CommonLib</PackageProjectUrl>
<Version>0.1.19</Version>
<Version>0.1.20</Version>
</PropertyGroup>

<!-- Code configuration -->
Expand Down
8 changes: 4 additions & 4 deletions Sources/Kysect.CommonLib/FileSystem/DirectoryExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Kysect.CommonLib.FileSystem;

public static class DirectoryExtensions
{
public static void EnsureParentDirectoryExists(IFileSystem fileSystem, string path)
public static void EnsureParentDirectoryExists(this IFileSystem fileSystem, string path)
{
fileSystem.ThrowIfNull();
path.ThrowIfNull();
Expand All @@ -14,7 +14,7 @@ public static void EnsureParentDirectoryExists(IFileSystem fileSystem, string pa
EnsureParentDirectoryExists(fileSystem, fileInfo);
}

public static void EnsureParentDirectoryExists(IFileSystem fileSystem, IFileInfo file)
public static void EnsureParentDirectoryExists(this IFileSystem fileSystem, IFileInfo file)
{
fileSystem.ThrowIfNull();
file.ThrowIfNull();
Expand All @@ -25,15 +25,15 @@ public static void EnsureParentDirectoryExists(IFileSystem fileSystem, IFileInfo
EnsureDirectoryExists(fileSystem, file.Directory);
}

public static void EnsureDirectoryExists(IFileSystem fileSystem, IDirectoryInfo directory)
public static void EnsureDirectoryExists(this IFileSystem fileSystem, IDirectoryInfo directory)
{
fileSystem.ThrowIfNull();
directory.ThrowIfNull();

EnsureDirectoryExists(fileSystem, directory.FullName);
}

public static void EnsureDirectoryExists(IFileSystem fileSystem, string path)
public static void EnsureDirectoryExists(this IFileSystem fileSystem, string path)
{
fileSystem.ThrowIfNull();
path.ThrowIfNull();
Expand Down

0 comments on commit 6ae2f23

Please sign in to comment.