/** * Deletes the given file from the RFS if it exists, * also deletes all parameter variations of the file.<p> * * @param rfsFilePath the path of the RFS file to delete * @param vfsName the VFS name of the file to delete (required for logging) */ protected void purgeFile(String rfsFilePath, String vfsName) { File rfsFile = new File(rfsFilePath); // first delete the base file deleteFile(rfsFile, vfsName); // now delete the file parameter variations // get the parent folder File parent = rfsFile.getParentFile(); if (parent != null) { // list all files in the parent folder that are variations of the base file File[] paramVariants = parent.listFiles(new PrefixFileFilter(rfsFile)); if (paramVariants != null) { for (int v = 0; v < paramVariants.length; v++) { deleteFile(paramVariants[v], vfsName); } } } }
/** * Deletes the given file from the RFS if it exists, * also deletes all parameter variations of the file.<p> * * @param rfsFilePath the path of the RFS file to delete * @param vfsName the VFS name of the file to delete (required for logging) */ protected void purgeFile(String rfsFilePath, String vfsName) { File rfsFile = new File(rfsFilePath); // first delete the base file deleteFile(rfsFile, vfsName); // now delete the file parameter variations // get the parent folder File parent = rfsFile.getParentFile(); if (parent != null) { // list all files in the parent folder that are variations of the base file File[] paramVariants = parent.listFiles(new PrefixFileFilter(rfsFile)); if (paramVariants != null) { for (int v = 0; v < paramVariants.length; v++) { deleteFile(paramVariants[v], vfsName); } } } }