Class FileUtil
java.lang.Object
de.uplanet.lucy.server.auxiliaries.FileUtil
@VelocityVariable("FileUtil")
@VelocityCallable("singleton")
public final class FileUtil
extends Object
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanChecks if the given path references a file system object within the portal.de.uplanet.lucy.server.businesslogic.util.VMFileInfogetFileInfo(de.uplanet.lucy.server.IProcessingContext p_ctx, de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, String p_strPageGuid, String p_strControlName) getIconPathOfKnownFileExtension(String p_strFileName) getIconUrlOfKnownFileExtension(String p_strFileName) getKnownFileExtension(String p_strFileName) Returns the known Intrexx file extensions.booleanhasFileExtension(Object p_object, String p_strSuffix) Check if the given object has the given suffix.booleanhasFileExtension(Object p_object, List<String> p_patterns) Check if the given object has one of the given the given suffixes.booleanisDirectory(String p_strPath) Checks if the given path references a directory within the portal.booleanChecks if the given path references a file within the portal.
- 
Constructor Details- 
FileUtilpublic FileUtil()
 
- 
- 
Method Details- 
existsChecks if the given path references a file system object within the portal.- Parameters:
- p_strPath- The path.
- Returns:
- trueif the given path references a file system object within the portal, or- falseotherwise.
- Throws:
- SecurityException- If the given path references a file system object outside the portal.
 
- 
isFileChecks if the given path references a file within the portal.- Parameters:
- p_strPath- The file path.
- Returns:
- trueif the given path references a file within the portal, or- falseotherwise.
- Throws:
- SecurityException- If the given path references a file outside the portal.
 
- 
isDirectoryChecks if the given path references a directory within the portal.- Parameters:
- p_strPath- The directory path.
- Returns:
- trueif the given path references a directory within the portal, or- falseotherwise.
- Throws:
- SecurityException- If the given path references a directory outside the portal.
 
- 
hasFileExtensionCheck if the given object has the given suffix.Note that for file extensions the dot has to be included in the pattern. The internal comparison is lower-case. - Parameters:
- p_object- The object (e.g. string, file, or path).
- p_strSuffix- The file extension.
- Returns:
- trueif the object has the given suffix, or- falseotherwise.
- Throws:
- IllegalArgumentException- If the given object is- null.
 
- 
hasFileExtensionCheck if the given object has one of the given the given suffixes.Note that for file extensions the dot has to be included in the patterns. The internal comparison is lower-case. - Parameters:
- p_object- The object (e.g. string, file, or path).
- p_patterns- A list of file extensions (suffixes).
- Returns:
- trueif the object has one of the given suffixes, or- falseotherwise.
- Throws:
- IllegalArgumentException- If the given object is- null.
 
- 
getFileInfopublic de.uplanet.lucy.server.businesslogic.util.VMFileInfo getFileInfo(de.uplanet.lucy.server.IProcessingContext p_ctx, de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, String p_strPageGuid, String p_strControlName) throws Exception - Throws:
- Exception
 
- 
getKnownFileExtensionsReturns the known Intrexx file extensions.- Returns:
- List of known file extensions
 
- 
getKnownFileExtension- Parameters:
- p_strFileName- The file name
- Returns:
- The known file extension, if a extension not known, "unknown" will returned.
 
- 
getIconUrlOfKnownFileExtension
- 
getIconPathOfKnownFileExtension- Parameters:
- p_strFileName- The file name.
- Returns:
- Returns the path to content type icon for the file. The path will be relative to the portal root directory.
 
 
-