@ac-essentials/misc-util
    Preparing search index...

    Variable escapePathConst

    escapePath: (str: string, replacement?: string) => string = ...

    Escapes a string to be used as a safe file or directory name.

    It replaces any characters that are not allowed in file or directory names with an underscore (_). It also ensures that the name does not exceed the maximum length allowed by the operating system (255 characters).

    On POSIX systems, it replaces / and null characters. On Windows systems, it replaces < > : " / \ | ? * and control characters (0-31). It also avoids reserved names like CON, PRN, AUX, NUL, COM1, LPT1, etc.

    Type Declaration

      • (str: string, replacement?: string): string
      • Parameters

        • str: string

          The string to escape

        • Optionalreplacement: string

        Returns string

        The escaped string