C-DEngine 5.105

TheCommonUtils..::..GetSafeFileName Method

Returns a file name where all reserved characters are replaced with underscore ("_"). Optionally add a timestamp to the file name. Example: GetSafeFileName("a+b:c/d", "json", true) returns a+b_c_d_201801241106123.json.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static string GetSafeFileName(
	string name,
	string extension,
	bool addTimeStamp
)
Public Shared Function GetSafeFileName ( _
	name As String, _
	extension As String, _
	addTimeStamp As Boolean _
) As String
public:
static String^ GetSafeFileName(
	String^ name, 
	String^ extension, 
	bool^ addTimeStamp
)

Parameters

name
Type: String
extension
Type: String
addTimeStamp
Type: Boolean

Return Value

A string with the safe file name.