parent
f8640d4ee7
commit
21ab76dbd3
1 changed files with 428 additions and 188 deletions
16
src/sdk.tests/FileExtensions.cs
Normal file
16
src/sdk.tests/FileExtensions.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
namespace Geekeey.Arcade.NET.Tests;
|
||||
|
||||
public static class FileExtensions
|
||||
{
|
||||
extension(File)
|
||||
{
|
||||
public static string? GetPathOfFileAbove(string directory, string file)
|
||||
{
|
||||
var directoryName = Directory.GetDirectoryNameOfFileAbove(directory, file);
|
||||
return directoryName is null ? null : Path.Combine(directoryName, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue