[JENKINS-39179] [JENKINS-36088] Always use NIO to create and detect symbolic...
[JENKINS-39179] [JENKINS-36088] Always use NIO to create and detect symbolic links and Windows junctions (#3133) * Always use NIO to detect symlinks * Make assertion failure message consistent * Catch NoSuchFileException to keep tests passing * Make method name more specific and simlify assumption * Remove obsolete comment and reword the main comment in isSymlink * Deprecate Kernel32Util#isJunctionOrSymlink * Use assumptions for junction creation and add messages to assumptions * Replace deprecated code with recommended alternative * Add comment explaining call to DosFileAttributes#isOther * Do not fall back to native code when creating symlinks * Log FileSystemExceptions when creating symbolic links * Catch InvalidPathException and rethrow as IOException * Deprecate Kernel32Utils#createSymbolicLink and #getWin32FileAttributes * Preserve original logging behavior on Windows and remove useless call to Util#displayIOException
Please register or sign in to comment