class FileSystemUtils {

    static boolean matches(Path pathFile, String contentId, FolderContentType contentType) {
        boolean passFilter = false;
        try (InputStream inputStream = Files.newInputStream(pathFile)) {
            FolderEntry folderEntry = readEntryFromStream(inputStream);
            if (Objects.equals(contentType, folderEntry.getContentType()) && //
                    StringUtils.equalsIgnoreCase(folderEntry.getContentId(), contentId)) {
                passFilter = true;
            }
        } catch (IOException e) {
            throw new TDPException(UNABLE_TO_READ_FOLDER_ENTRY, e, build().put("path", pathFile));
        }
        return passFilter;
    }

    private  FileSystemUtils();

}