Loupe - Log - Monitor - Resolve
Gibraltar Namespace / FileSystemTools Class / SanitizeDirectoryName Method
The name of the directory to sanitize.
When true, treat whitespace as an illegal value
When true, ensure the final name is lower case.
The character to substitute for illegal values, must be legal.

In This Topic
    SanitizeDirectoryName Method
    In This Topic
    Sanitize the provided directory name by substituting a specified character for illegal values.
    Syntax
    'Declaration
     
    
    Public Shared Function SanitizeDirectoryName( _
       ByVal directoryName As String, _
       Optional ByVal eliminateSpaces As Boolean, _
       Optional ByVal lowerCaseOnly As Boolean, _
       Optional ByVal replaceChar As Char _
    ) As String
    public static string SanitizeDirectoryName( 
       string directoryName,
       bool eliminateSpaces,
       bool lowerCaseOnly,
       char replaceChar
    )

    Parameters

    directoryName
    The name of the directory to sanitize.
    eliminateSpaces
    When true, treat whitespace as an illegal value
    lowerCaseOnly
    When true, ensure the final name is lower case.
    replaceChar
    The character to substitute for illegal values, must be legal.

    Return Value

    The sanitized directory name.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also