|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.file.FileUtil
public class FileUtil
Utility methods for file manipulation.
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static String |
calculateWWWFileRelativePath(String path)
Calculates the physical path to the www folder according to a FileConfig path . |
static void |
deletePortalFile(PortalFile portalFile)
Deletes portal file and all empty ancestor folders. |
static String |
getContentType(File file)
Gets content type based on the given file. |
static IWebsite |
getWebsiteByFile(FileConfig fileConfig,
ITransaction transaction)
Returns the website of the given file (the website that contains the file's service instance). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static String getContentType(File file) throws IOException
file
- the file.
IOException
- if an IO error occured.public static String calculateWWWFileRelativePath(String path)
FileConfig path
.
path
- the path stored in the FileConfig
.
public static void deletePortalFile(PortalFile portalFile)
portalFile
- the file
to be deleted.public static IWebsite getWebsiteByFile(FileConfig fileConfig, ITransaction transaction) throws ManagerException, PortalException
fileConfig
- the file.transaction
- the transaction.
ManagerException
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |