StringHelper.SanitizeFilePath method
namespace: Serenity assembly: Serenity.Net.Core
Sanitizes the path by removing diacritics, ı with i and replacing any invalid file path characters with underscore.
public static string SanitizeFilePath(string filename, string replacement = "_",
bool removeDiacritics = true)
parameter | description |
---|---|
filename | The string. |
replacement | Replacement string for invalid characters |
removeDiacritics | True to remove diacritics |
Exceptions
exception | condition |
---|---|
ArgumentNullException | s is null |
See Also
- class StringHelper