Skip to content

Commit 3acf2cd

Browse files
authored
IO-768: Add reserved Windows file names CONIN$ and CONOUT$ to FileSystem (#355)
1 parent 78dc29c commit 3acf2cd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/org/apache/commons/io/FileSystem.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ public enum FileSystem {
7373
*
7474
* @see <a href="https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file">Naming Conventions
7575
* (microsoft.com)</a>
76+
* @see <a href="https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#consoles">
77+
* CreateFileA function - Consoles (microsoft.com)</a>
7678
*/
7779
WINDOWS(false, true, 255,
7880
32000, new char[] {
@@ -86,8 +88,8 @@ public enum FileSystem {
8688
'"', '*', '/', ':', '<', '>', '?', '\\', '|'
8789
// @formatter:on
8890
}, // KEEP THIS ARRAY SORTED!
89-
new String[] { "AUX", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "CON", "LPT1",
90-
"LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "NUL", "PRN" }, true, '\\');
91+
new String[] { "AUX", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "CON", "CONIN$", "CONOUT$",
92+
"LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "NUL", "PRN" }, true, '\\');
9193

9294
/**
9395
* <p>

0 commit comments

Comments
 (0)