• K
    [JENKINS-47324] - Reduce usage of File.mkdirs() in FilePath and IOUtils (#3173) · 09bcc5d6
    Krishan Bhasin 提交于
    * Move an instance of renameTo() to Files.move()
    
    * Replace an instance of File.toURI() with an instance of Path.toUri()
    
    * Replace mkdirs() with Files.createDirectories()
    Replace mkdir() with Files.createTempDirectory()
    
    * Undo addition of createTempDirectory() as per review comments
    
    * Return to use of FilePath#mkdirs(File) and instead modify it to use the new API.
    
    * Undo addition of toPath() in a URI conversion as it brings no benefits.
    
    * Replace new uses of toPath() with Util.fileToPath() to pre-handle runtime exceptions
    
    * Remove * import.
    move mkdirs() to using FilePath method instead of File method.
    
    * Make IOUtils.mkdirs(File) use Java7 API calls
    
    * Add back accidentally removed imports.
    
    * Fixed use of wildcard import
    
    * Use utility method fileToPath() to handle potential exception thrown
    09bcc5d6
IOUtils.java 20.6 KB