Class FileUtil


  • public class FileUtil
    extends Object
    • Constructor Detail

      • FileUtil

        public FileUtil()
    • Method Detail

      • downloadDir

        public static File downloadDir()
        Returns location of downloads directory: either Downloads under user home directory, or temporary directory
      • contentDir

        public static String contentDir()
        Returns absolute name of content directory
      • unzip

        public static Path unzip​(File file,
                                 File dir)
                          throws IOException
        Unzip a file to a directory
        Parameters:
        file - zip to unzip
        dir - where to
        Returns:
        newly created directory containing extracted files
        Throws:
        IOException - if anything goes wrong