public final class FileUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONSTANT_MIME_TYPE_CSV |
static String |
CONSTANT_MIME_TYPE_ZIP |
static String |
EXTENSION_CSV |
static String |
EXTENSION_ZIP |
Modifier and Type | Method and Description |
---|---|
static void |
deleteFile(File file)
Delete the file.
|
static boolean |
hasHtmlExtension(String strFileName)
Check if a file has a valid html extension
|
static boolean |
hasImageExtension(String strImageFileName)
Check if the extension of the file is an image extension
|
static String |
normalizeFileName(String string)
Converts French diacritics characters into non diacritics.
|
static void |
zipFiles(Path zipFile,
Path... paths)
creates a zip file
|
public static final String CONSTANT_MIME_TYPE_ZIP
public static final String CONSTANT_MIME_TYPE_CSV
public static final String EXTENSION_ZIP
public static final String EXTENSION_CSV
public static boolean hasImageExtension(String strImageFileName)
strImageFileName
- The file name to checkpublic static boolean hasHtmlExtension(String strFileName)
strFileName
- The file name to checkpublic static void zipFiles(Path zipFile, Path... paths) throws IOException
zipFile
- the zipfile to createfiles
- to add to the ZipIOException
public static final String normalizeFileName(String string)
string
- public static void deleteFile(File file)
pathname
- Copyright © 2020 City of Paris. All rights reserved.