Click or drag to resize

CommonUtilSafeFilename Method

Replaces illegal file or path characters from a simple filename with underscores.

Namespace: RCS.Carbon.Shared
Assembly: RCS.Carbon.Shared (in RCS.Carbon.Shared.dll) Version: 9.0.12
Syntax
C#
public static string SafeFilename(
	string filename,
	string replace = "_"
)

Parameters

filename  String
Simple (unqualified) filename to make safe.
replace  String  (Optional)
Character to replace illegal characters. Defaukt is underscore.

Return Value

String
A filename only containing safe characters.
See Also