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 String
contentDir()
Returns absolute name of content directorystatic File
downloadDir()
Returns location of downloads directory: either Downloads under user home directory, or temporary directorystatic Path
unzip(File file, File dir)
Unzip a file to a directorystatic String
uploadDir()
Returns absolute name of uploaded content 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
-
uploadDir
public static String uploadDir()
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 unzipdir
- where to- Returns:
- newly created directory containing extracted files
- Throws:
IOException
- if anything goes wrong
-
-