// Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/DeletingFileVisitor.java
// public class DeletingFileVisitor extends SimpleFileVisitor<Path> {
// 
//     @Override
//     public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
//         Files.delete(file);
//         return FileVisitResult.CONTINUE;
//     }
// 
//     @Override
//     public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
//         Files.delete(dir);
//         return FileVisitResult.CONTINUE;
//     }
//     
// }
// 
// Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/NativeProcessRunner.java
// public static final int NO_ERROR_CODE = 0;


import com.microchip.mplab.nbide.embedded.api.LanguageTool;
import com.microchip.mplab.nbide.embedded.arduino.utils.DeletingFileVisitor;
import static com.microchip.mplab.nbide.embedded.arduino.importer.NativeProcessRunner.NO_ERROR_CODE;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import static java.nio.file.FileVisitResult.CONTINUE;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import jdk.nashorn.api.scripting.ScriptObjectMirror;
        }
    }

    public List<Path> getMainLibraryPaths() {
        return new ArrayList<>(mainLibraryPaths);
    }
    
    public List<Path> getAuxLibraryPaths() {
        return new ArrayList<>(auxLibraryPaths);
    }
    
    public List<Path> getAllLibraryPaths() {
        List <Path> ret = new ArrayList<>(mainLibraryPaths);
        ret.addAll(auxLibraryPaths);
        return ret;
    }

    public String getCommand() {
        return nativeProcessRunner.getNativeProcessCommandString();
    }

    public Path getPreprocessDirPath() {
        return preprocessDirPath;
    }

    public Path getPreprocessedSketchDirPath() {
        return preprocessDirPath.resolve("sketch");
    }

    public void cleanup() throws IOException {
// Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/DeletingFileVisitor.java
// public class DeletingFileVisitor extends SimpleFileVisitor<Path> {
// 
//     @Override
//     public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
//         Files.delete(file);
//         return FileVisitResult.CONTINUE;
//     }
// 
//     @Override
//     public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
//         Files.delete(dir);
//         return FileVisitResult.CONTINUE;
//     }
//     
// }
// 
// Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/NativeProcessRunner.java
// public static final int NO_ERROR_CODE = 0;


// Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoBuilderRunner.java
import com.microchip.mplab.nbide.embedded.api.LanguageTool;
import com.microchip.mplab.nbide.embedded.arduino.utils.DeletingFileVisitor;
import static com.microchip.mplab.nbide.embedded.arduino.importer.NativeProcessRunner.NO_ERROR_CODE;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import static java.nio.file.FileVisitResult.CONTINUE;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import jdk.nashorn.api.scripting.ScriptObjectMirror;

        }
    }

    public List<Path> getMainLibraryPaths() {
        return new ArrayList<>(mainLibraryPaths);
    }
    
    public List<Path> getAuxLibraryPaths() {
        return new ArrayList<>(auxLibraryPaths);
    }
    
    public List<Path> getAllLibraryPaths() {
        List <Path> ret = new ArrayList<>(mainLibraryPaths);
        ret.addAll(auxLibraryPaths);
        return ret;
    }

    public String getCommand() {
        return nativeProcessRunner.getNativeProcessCommandString();
    }

    public Path getPreprocessDirPath() {
        return preprocessDirPath;
    }

    public Path getPreprocessedSketchDirPath() {
        return preprocessDirPath.resolve("sketch");
    }

    public void cleanup() throws IOException {
        Files.walkFileTree(preprocessDirPath, new DeletingFileVisitor());