FilesCanCreate Method

Note: This API is now obsolete.
Checks whether a file can be created with given name.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
C#
[ObsoleteAttribute("This method is obsolete. Use TryCreateWithPath method instead")]
public static bool CanCreate(
	string fileName,
	bool canOverwrite = true
)

Parameters

fileName  String
The name of the file to test.
canOverwrite  Boolean  (Optional)
When , then file will not be overwritten if already exists and the result will be . When , then the already existing file will be overwritten and deleted. This parameter is optional.
Default value: .

Return Value

Boolean
, if fileName can be created; otherwise, .

Exceptions

See Also