public List<JobProfile> readFromLocal() {
        List<JobProfile> profileList = new ArrayList<>();
        try {
            if (Files.isDirectory(this.filePath)) {
                // list parent path and find files which name is end with .json or .properties
                try (final Stream<Path> pathStream = Files.list(this.filePath)) {
                    for (Iterator<Path> it = pathStream.iterator(); it.hasNext();) {
                        String childPath = it.next().toString();
                        JobProfile jobProfile = null;
                        if (childPath.endsWith(JSON_SUFFIX)) {
                            jobProfile = JobProfile.parseJsonFile(childPath);
                        } else if (childPath.endsWith(PROPERTIES_SUFFIX)) {
                            jobProfile = JobProfile.parsePropertiesFile(childPath);
                        }
                        if (jobProfile != null && jobProfile.allRequiredKeyExist()) {
                            profileList.add(jobProfile);
                        }
                    }
                } catch (Exception e) {
                    LOGGER.error("error caught", e);
                }
            }
        } catch (Exception ex) {
            LOGGER.error("error in reading files {}", this.filePath);
        }
        return profileList;
    }
If filePath is a directory, read all local file and construct job profiles

@return list of JobProfiles
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/store/LocalProfile.java