FilesCanCreate Method
Note: This API is now obsolete.
Checks whether a file can be created with given name.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
[ObsoleteAttribute("This method is obsolete. Use TryCreateWithPath method instead")]
public static bool CanCreate(
string fileName,
bool canOverwrite = true
)
<ObsoleteAttribute("This method is obsolete. Use TryCreateWithPath method instead")>
Public Shared Function CanCreate (
fileName As String,
Optional canOverwrite As Boolean = true
) As Boolean
public:
[ObsoleteAttribute(L"This method is obsolete. Use TryCreateWithPath method instead")]
static bool CanCreate(
String^ fileName,
bool canOverwrite = true
)
[<ObsoleteAttribute("This method is obsolete. Use TryCreateWithPath method instead")>]
static member CanCreate :
fileName : string *
?canOverwrite : bool
(* Defaults:
let _canOverwrite = defaultArg canOverwrite true
*)
-> bool
- 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: .
Boolean, if
fileName can be created; otherwise,
.