Skip to content

Helpers.CheckHelper

Gigas002 edited this page Oct 20, 2019 · 6 revisions

Class with static methods for check the errors.

Namespace

GTiff2Tiles.Core.Helpers

Methods

CheckInputFileAsync

Description: Checks the existance, projection and type.

Syntax:

public static async ValueTask<bool> CheckInputFileAsync(FileInfo inputFileInfo)

Parameters:

Type Name Description
System.IO.FileInfo inputFileInfo Input file

Returns: System.Threading.Tasks.ValueTask<bool>, True if no errors in input file, False otherwise.

CheckOutputDirectory

Description: Checks, if directory's path is not empty, creates directory if it doesn't exist and checks if it's empty or not.

Syntax:

public static void CheckDirectory(DirectoryInfo directoryInfo, bool? shouldBeEmpty = null)

Parameters:

Type Name Description
System.IO.DirectoryInfo outputDirectoryInfo Output directory
System.Boolean shouldBeEmpty Should directory be empty? If set null, emptyness doesn't check
Clone this wiki locally