Click or drag to resize
FileSystemRepositoryHelperGetFileSystemName Method (String, Int32, Int32)
Gets file system safe representation of name. The resulting name does not exceed maxNameLength characters in length. maxNameLength must accommodate hashLength and delimiting character.

Namespace: CMS.ContinuousIntegration
Assembly: CMS.ContinuousIntegration (in CMS.ContinuousIntegration.dll) Version: 13.0.131
Syntax
C#
public static string GetFileSystemName(
	string name,
	int maxNameLength,
	int hashLength
)

Parameters

name
Type: SystemString
Name to be transformed to file system safe representation.
maxNameLength
Type: SystemInt32
Max length of the resulting name.
hashLength
Type: SystemInt32
Number of hash characters to be included in the resulting name, if hashing is needed.

Return Value

Type: String
Name in file system safe representation.
Exceptions
ExceptionCondition
ArgumentExceptionThrown when name is null or empty.
ArgumentOutOfRangeExceptionThrown when hashLength is not a positive integer or maxNameLengthis not greater than (hash length + 1) - the extra character is for hash delimiter.
Remarks
The name processing is similar to code name processing. Diacritics in Latin characters is removed, illegal characters are replaced by '_' (underscore), multiple '.' (dot) are grouped to single '.', leading and trailing '.' and '_' are trimmed.
See Also