class FileSystemUtils {

    static boolean hasEntry(Path path) {
        boolean hasChild;
        try (Stream<Path> pathsStream = Files.walk(path)) {
            hasChild =
                    pathsStream.filter(Files::isRegularFile).map(FileSystemUtils::toFolderEntry).findAny().isPresent();
        } catch (IOException e) {
            throw new TDPException(UNABLE_TO_DELETE_FOLDER, e, build().put("path", path));
        }
        return hasChild;
    }

    private  FileSystemUtils();

}