ome / omero-insight

Gradle project containing insight java client for OMERO
https://www.openmicroscopy.org/omero/
GNU General Public License v2.0
7 stars 14 forks source link

Remove apache commons io #437

Open dominikl opened 8 months ago

dominikl commented 8 months ago

Equivalent to https://github.com/ome/omero-romio/pull/14 . But currently still fails because of the commons.io dep of omero-blitz.

It uses these replacements:

FilenameUtils.getBaseName -> MoreFiles.getNameWithoutExtension
FilenameUtils.getName -> Path.getFileName
FilenameUtils.getPath -> Path.toString
FilenameUtils.concat -> Paths.get
FilenameUtils.getExtension -> MoreFiles.getFileExtension
FilenameUtils.isExtension -> MoreFiles.getFileExtension
FilenameUtils.removeExtension -> MoreFiles.getNameWithoutExtension
FilenameUtils.getPrefix -> Path.getRoot

FileUtils.byteCountToDisplaySize -> own impl in IOUtil  (Returns a human-readable version of the file size)
FileUtils.copyURLToFile -> Files.copy
FileUtils.sizeOfDirectory -> own impl in IOUtil  (Counts the size of a directory recursively)
FileUtils.forceMkdir -> Files.createDirectory
FileUtils.deleteDirectory ->  MoreFiles.deleteRecursively
FileUtils.copyFile -> Files.copy
FileUtils.copyFileToDirectory -> Files.copy
FileUtils.moveFileToDirectory -> Files.move
FileUtils.writeStringToFile -> Files.write
FileUtils.readFileToString -> Files.readLines