The issue you're facing is due to the way Kotlin handles string literals, specifically triple quotes """...""" which are used for raw strings. In raw strings, Kotlin still interprets some escape sequences, including \" as an escaped double quote.
However, for your case, where you want to represent a Windows path like ChromiumRecorder\, you have a couple of options:
1. Use a raw string and manually handle the backslash
You can use a raw string and double the backslash to make Kotlin treat it as a literal backslash:
val path = """ChromiumRecorder\\"""
Or, more idiomatically, you can use the File class to construct paths in a way that's safe for the operating system your code is running on:
import java.io.File
val path = File("ChromiumRecorder", "").path
// or
val path = File("ChromiumRecorder").absolutePath
2. Use a regular string with escaped backslash
Alternatively, you can use a regular string with a single quote or double quotes and just escape the backslash:
val path = "ChromiumRecorder\\"
3. Use a platform-specific approach
For a more platform-agnostic solution, consider using Kotlin's Path or File classes:
import java.nio.file.Paths
val path = Paths.get("ChromiumRecorder").toString()
Recommendation
The most robust and platform-agnostic way to handle paths in Kotlin is by using the java.io.File or java.nio.file.Paths classes. Not only do these classes handle the nuances of different operating system's path representations, but they also provide a wealth of functionality for manipulating and checking the existence of files and directories.
For simply representing a directory path on Windows without any additional processing, doubling the backslash in a raw string ("""ChromiumRecorder\\""") or using File/Paths classes will serve you well.