25 lines
854 B
C#
25 lines
854 B
C#
|
using System.Runtime.CompilerServices;
|
||
|
using static System.Runtime.CompilerServices.MethodImplOptions;
|
||
|
|
||
|
namespace InnovEnergy.API;
|
||
|
|
||
|
public static class PathExtensions
|
||
|
{
|
||
|
|
||
|
[MethodImpl(AggressiveInlining)]
|
||
|
public static String GetFileNameWithoutExtension(this String path) => Path.GetFileNameWithoutExtension(path);
|
||
|
|
||
|
[MethodImpl(AggressiveInlining)]
|
||
|
public static String GetFileName(this String path) => Path.GetFileName(path);
|
||
|
|
||
|
[MethodImpl(AggressiveInlining)]
|
||
|
public static String GetExtension(this String path) => Path.GetExtension(path);
|
||
|
|
||
|
[MethodImpl(AggressiveInlining)]
|
||
|
public static IEnumerable<String> GetDirectories(this String path) => Directory.EnumerateDirectories(path);
|
||
|
|
||
|
[MethodImpl(AggressiveInlining)]
|
||
|
public static IEnumerable<String> GetFiles(this String path) => Directory.EnumerateFiles(path);
|
||
|
|
||
|
|
||
|
}
|