File names on many operating systems, including Windows and UNIX, may be used to access special files, which are actually devices. Reserved MS-DOS device Reserved Microsoft Windows device names include AUX, CON, PRN, COM1, and LPT1. Device or paths using the \\.\ device namespace. Device files on UNIX systems are used to apply access rights and to direct operations on the files to the appropriate device drivers.
...
Microsoft documents a list of reserved identifiers that represent devices and have a device namespace to be used specifically by devices [MSDN]. The isReservedName() function in this compliant solution can be used to determine if a specified path refers to a device. Care Care must be taken to avoid a TOCTOU race condition when first testing a pathname using the isReservedName() function and then later operating on that pathname.
...