src/main/java/org/edgegallery/appstore/infrastructure/util/AppUtil.java
public void deleteTempFolder(String fileParent, String fileNameExtension) {
        File file = new File(fileParent);
        String parent = file.getParent();
        File parentDir = new File(parent);
        File[] files = parentDir.listFiles();
        if (files != null && files.length > 0) {
            for (File tempFile : files) {
                if (tempFile.getName().endsWith(fileNameExtension) || tempFile.getName().endsWith(PNG_EXTENSION)
                    || tempFile.getName().endsWith(VIDIO_EXTENSION)) {
                    continue;
                }
                FileUtils.deleteQuietly(tempFile);

            }
        }
    }
/**
     * delete temp file and folder.
     *
     * @param fileParent fileParent.
     */
delete temp file and folder.
@param fileParent fileParent.
delete temp file and folder . @param fileParent fileParent .
public void deleteTempFolder(String fileParent, String fileNameExtension) {
        File file = new File(fileParent);
        String parent = file.getParent();
        File parentDir = new File(parent);
        File[] files = parentDir.listFiles();
        if (files != null && files.length > 0) {
            for (File tempFile : files) {
                if (tempFile.getName().endsWith(fileNameExtension) || tempFile.getName().endsWith(PNG_EXTENSION)
                    || tempFile.getName().endsWith(VIDIO_EXTENSION)) {
                    continue;
                }
                FileUtils.deleteQuietly(tempFile);
            }
        }
    }
public void deleteTempFolder ( String fileParent , String fileNameExtension ) { File file = new File ( fileParent ) ; String parent = file . getParent ( ) ; File parentDir = new File ( parent ) ; File [ ] files = parentDir . listFiles ( ) ; if ( files != null && files . length > 0 ) { for ( File tempFile : files ) { if ( tempFile . getName ( ) . endsWith ( fileNameExtension ) || tempFile . getName ( ) . endsWith ( PNG_EXTENSION ) || tempFile . getName ( ) . endsWith ( VIDIO_EXTENSION ) ) { continue ; } FileUtils . deleteQuietly ( tempFile ) ; } } }
delete temp file and folder.
delete temp file and folder .