1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00
This commit is contained in:
Federico Fissore
2012-12-12 17:40:26 +01:00
parent cce70d269c
commit a5067567ed
3 changed files with 19 additions and 6 deletions

View File

@ -644,14 +644,18 @@ public class Compiler implements MessageConsumer {
* not the header files in its sub-folders, as those should be included from
* within the header files at the top-level).
*/
static public String[] headerListFromIncludePath(String path) {
static public String[] headerListFromIncludePath(String path) throws IOException {
FilenameFilter onlyHFiles = new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.endsWith(".h");
}
};
return (new File(path)).list(onlyHFiles);
String[] list = (new File(path)).list(onlyHFiles);
if (list == null) {
throw new IOException();
}
return list;
}
static public ArrayList<File> findFilesInPath(String path, String extension,