In Java/Scala API, there is a readFile(fileInputFormat, path, watchType, interval, pathFilter, typeInfo) method which reads files in the path based on the given fileInputFor