lumis.portal.file
Class FileUtil

Package class diagram package FileUtil
java.lang.Object
  extended by lumis.portal.file.FileUtil

public class FileUtil
extends java.lang.Object

Utility methods for file manipulation.

Since:
6.1.0

Constructor Summary
FileUtil()
           
 
Method Summary
static java.lang.String calculateWWWFileRelativePath(java.lang.String fullPath)
          Calculates the physical path to the www folder according to a given full path.
static void deletePortalFile(PortalFile portalFile)
          Deletes portal file and all empty ancestor folders.
static java.lang.String getContentType(java.io.File file)
          Gets content type based on the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

getContentType

public static java.lang.String getContentType(java.io.File file)
                                       throws java.io.IOException
Gets content type based on the given file.

Parameters:
file - the file.
Returns:
content type.
Throws:
java.io.IOException - if an IO error occured.
Since:
6.1.0

calculateWWWFileRelativePath

public static java.lang.String calculateWWWFileRelativePath(java.lang.String fullPath)
Calculates the physical path to the www folder according to a given full path.

Parameters:
fullPath - of the file to its www path calculated.
Returns:
absolute path to the file.
Since:
6.1.0

deletePortalFile

public static void deletePortalFile(PortalFile portalFile)
Deletes portal file and all empty ancestor folders.

Parameters:
portalFile - the file to be deleted.
Since:
6.1.0


Lumisportal  6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.