Table of Contents

Method CreateFilePathSafe

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

CreateFilePathSafe(string)

Creates the directory for the specified file path if it does not already exist. This method is a safe version of CreateFilePath(string) that catches exceptions.

public static bool CreateFilePathSafe(string pathToFile)

Parameters

pathToFile string

The file path for which the directory should be created.

Returns

bool

true if the directory was successfully created or already exists; otherwise, false if an exception occurred.