public final class FileUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
buildFileName(String strFileName,
String strFormatExtension)
Build the file name
|
static void |
createFile(String strFolderPath,
String strFileName,
String strFileOutPut,
String strEncoding)
Create a file
|
static void |
deleteFile(String strFolderPath,
String strFileName)
Delete a file
|
static String |
readLastLine(String strFile)
Read the last line from the given file
|
static void |
writeToFile(String strContent,
String strFile)
Write to the given file
|
public static void createFile(String strFolderPath, String strFileName, String strFileOutPut, String strEncoding) throws IOException
strFolderPath
- the folder pathstrFileName
- the file namestrFileOutPut
- the file outputstrEncoding
- the encodingIOException
- exception if there is an error during the deletionpublic static void deleteFile(String strFolderPath, String strFileName) throws IOException
strFolderPath
- the folder pathstrFileName
- the file nameIOException
- exception if there is an error during the deletionpublic static String buildFileName(String strFileName, String strFormatExtension)
strFileName
- the name of the filestrFormatExtension
- the format extensionpublic static String readLastLine(String strFile)
strFile
- the file absolute path (ex : /home/filetopath/file.txt)Copyright © 2016 City of Paris. All rights reserved.