Class FileUtil

java.lang.Object
org.vrspace.server.core.FileUtil

public class FileUtil extends Object
  • Constructor Details

    • FileUtil

      public FileUtil()
  • Method Details

    • 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
    • uploadDir

      public static String uploadDir()
      Returns absolute name of uploaded content directory
    • generatedContentDir

      public static String generatedContentDir()
      Returns absolute name of uploaded 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