|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.plugins.form.utils.FileUtils
public final class FileUtils
FileUtils
Method Summary | |
---|---|
static java.lang.String |
buildFileName(java.lang.String strFileName,
java.lang.String strFormatExtension)
Build the file name |
static void |
createFile(java.lang.String strFolderPath,
java.lang.String strFileName,
java.lang.String strFileOutPut,
java.lang.String strEncoding)
Create a file |
static void |
deleteFile(java.lang.String strFolderPath,
java.lang.String strFileName)
Delete a file |
static java.lang.String |
readLastLine(java.lang.String strFile)
Read the last line from the given file |
static void |
writeToFile(java.lang.String strContent,
java.lang.String strFile)
Write to the given file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void createFile(java.lang.String strFolderPath, java.lang.String strFileName, java.lang.String strFileOutPut, java.lang.String strEncoding) throws java.io.IOException
strFolderPath
- the folder pathstrFileName
- the file namestrFileOutPut
- the file outputstrEncoding
- the encoding
java.io.IOException
- exception if there is an error during the deletionpublic static void deleteFile(java.lang.String strFolderPath, java.lang.String strFileName) throws java.io.IOException
strFolderPath
- the folder pathstrFileName
- the file name
java.io.IOException
- exception if there is an error during the deletionpublic static java.lang.String buildFileName(java.lang.String strFileName, java.lang.String strFormatExtension)
form
- the formstrFormatExtension
- the format extension
public static java.lang.String readLastLine(java.lang.String strFile)
strFile
- the file absolute path (ex : /home/filetopath/file.txt)
public static void writeToFile(java.lang.String strContent, java.lang.String strFile)
strContent
- the content to writestrFile
- the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |