checkId static method
Validates an ID for compatibility with the filesystem.
Checks the ID against MemoryIdGrammar and explicitly rejects
Windows-reserved device names (e.g., CON, NUL) to prevent
I/O failures on Windows hosts.
Implementation
static void checkId(String id) {
MemoryIdGrammar.check(id, rejectWindowsReservedNames: true);
}