Package org.vrspace.server.core
Class FileUtil
- java.lang.Object
-
- org.vrspace.server.core.FileUtil
-
public class FileUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description FileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcontentDir()Returns absolute name of content directorystatic FiledownloadDir()Returns location of downloads directory: either Downloads under user home directory, or temporary directorystatic Pathunzip(File file, File dir)Unzip a file to a directory
-
-
-
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 unzipdir- where to- Returns:
- newly created directory containing extracted files
- Throws:
IOException- if anything goes wrong
-
-