FilesTryCreateWithPath Method

Tries to create a file of the specified path along with possibly non-existing parent directories.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
C#
public static FileStream? TryCreateWithPath(
	string path,
	bool overwriteIfExists = true
)

Parameters

path  String
The name of the file to be created with path.
overwriteIfExists  Boolean  (Optional)
to allow an already existing file to be overwritten; otherwise, .

Return Value

FileStream
A FileStream instance if the file could be created or overwritten; otherwise, .

See Also