<PackageReference Include="NJsonSchema" Version="9.13.25" />

DynamicApis

public static class DynamicApis
Provides dynamic access to framework APIs.
public static bool SupportsDirectoryApis { get; }

Gets a value indicating whether path APIs are available.

public static bool SupportsFileApis { get; }

Gets a value indicating whether file APIs are available.

public static bool SupportsHttpClientApis { get; }

Gets a value indicating whether WebClient APIs are available.

public static bool SupportsPathApis { get; }

Gets a value indicating whether path APIs are available.

public static bool SupportsXPathApis { get; }

Gets a value indicating whether XPath APIs are available.

public static Task DirectoryCreateDirectoryAsync(string directory)

Creates a directory.

public static Task<bool> DirectoryExistsAsync(string filePath)

Checks whether a directory exists.

public static Task<string> DirectoryGetCurrentDirectoryAsync()

Gets the current working directory.

public static Task<string[]> DirectoryGetFilesAsync(string directory, string filter)

Gets the files of the given directory.

public static Task<bool> FileExistsAsync(string filePath)

Checks whether a file exists.

public static Task<string> FileReadAllTextAsync(string filePath)

Reads all content of a file (UTF8).

public static Task FileWriteAllTextAsync(string filePath, string text)

Writes text to a file (UTF8).

public static string GetFullPath(string path)

Gets the full path from a given path

public static Task<string> HttpGetAsync(string url)

Request the given URL via HTTP.

public static string PathCombine(string path1, string path2)

Combines two paths.

public static string PathGetDirectoryName(string filePath)

Gets the directory path of a file path.

public static object XPathEvaluate(XDocument document, string path)

Evaluates the XPath for a given XML document.