Package org.vrspace.server.core
Class FileUtil
java.lang.Object
org.vrspace.server.core.FileUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns absolute name of attachment directory.static String
Returns absolute name of content directory.static File
Returns location of downloads directory: either Downloads under user home directory if exists, or system temporary directorystatic Path
Unzip a file to a directorystatic String
Returns absolute name of uploaded content directory, public access.
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
downloadDir
Returns location of downloads directory: either Downloads under user home directory if exists, or system temporary directory -
contentDir
Returns absolute name of content directory. Public access. -
uploadDir
Returns absolute name of uploaded content directory, public access. -
attachmentDir
Returns absolute name of attachment directory. Attachments must not be accessible over the web, but only through web API to authorized users. -
unzip
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
-