FileHelperGetUniqueFileName(String, String, String, Boolean) Method |
Returns a unique file name in a directory, appending a number if the file exists and optionally changing the extension.
If lockFile is true, an empty file is created atomically to reserve the name: the reservation is safe across threads and processes
sharing the same directory (e.g. several Seal processes writing to the same temporary directory).
Namespace: Seal.HelpersAssembly: SealLibrary (in SealLibrary.dll) Version: 10.2.0.0+da7797057e6d5ef3b02633ee3e36991921c726cb
Syntaxpublic static string GetUniqueFileName(
string directory,
string fileName,
string newExtension = "",
bool lockFile = false
)
Parameters
- directory String
-
- fileName String
-
- newExtension String (Optional)
-
- lockFile Boolean (Optional)
-
Return Value
String
See Also