org.openmobileis.common.util.file.FileUtilities Class Reference

List of all members.


Detailed Description

contains various utilities method related to file use.

Definition at line 36 of file FileUtilities.java.


Static Public Member Functions

static String convertFileNameToSystem (String zipFile)
 replace all nom system file separator by system file separator use for windows system to convert zip file name to windews file name
static boolean deleteDir (File dir)
 Deletes all files and subdirectories under the specified directory.
static String getPathFromCompleteFileName (String completeName)
 return the path extracted from the specified complete file name.
static String getNameFromCompleteFileName (String completeName)
 return the name of the file extracted from the specified complete file name.
static void moveFile (String oldFileName, String newFileName)
 move file from old name to new name.
static final void removeAllFile (File file, String ext, boolean recurcif)
 remove all file with the specified ext starting at file directory.

Member Function Documentation

static boolean org.openmobileis.common.util.file.FileUtilities.deleteDir ( File  dir  )  [static]

Deletes all files and subdirectories under the specified directory.

The specified directory is also deleted. return true if everything has been deleted.

Returns:
true if deletion is ok.

Definition at line 69 of file FileUtilities.java.

static String org.openmobileis.common.util.file.FileUtilities.getPathFromCompleteFileName ( String  completeName  )  [static]

return the path extracted from the specified complete file name.

The completeFileName must be conforme to the system file name (path+separator+fileName). Path end with the System separator. If not path is specified return empty string.

Definition at line 87 of file FileUtilities.java.

static String org.openmobileis.common.util.file.FileUtilities.getNameFromCompleteFileName ( String  completeName  )  [static]

return the name of the file extracted from the specified complete file name.

The completeFileName must be conforme to the system file name (path+SystemSeparator+fileName). if the file has not path return the CompleteFileName if the CompleteFileName has no fileName return empty string.

Definition at line 102 of file FileUtilities.java.

static void org.openmobileis.common.util.file.FileUtilities.moveFile ( String  oldFileName,
String  newFileName 
) [static]

move file from old name to new name.

If new fileExist delete it before move

Definition at line 117 of file FileUtilities.java.

static final void org.openmobileis.common.util.file.FileUtilities.removeAllFile ( File  file,
String  ext,
boolean  recurcif 
) [static]

remove all file with the specified ext starting at file directory.

If recursif is true remove inside sub directory. if ext is null, remove all file.

Definition at line 179 of file FileUtilities.java.


The documentation for this class was generated from the following file:
Generated on Mon Jan 11 21:19:20 2010 for OpenMobileIS by  doxygen 1.5.4