Table of Contents

Method DeleteIfExistsSafe

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

DeleteIfExistsSafe(string)

Deletes the specified file if it exists in a safe manner.

public static bool DeleteIfExistsSafe(string pathToFile)

Parameters

pathToFile string

The path to the file to be deleted.

Returns

bool

true if the file was successfully deleted or did not exist; otherwise, false if an exception occurred during the deletion process.