1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Getting rid of native stuff. Avoid native stuff: it will break. Fixes #2828, #2829, #2830

This commit is contained in:
Federico Fissore
2015-03-30 09:30:03 +02:00
parent 3788128385
commit b65b576eb0
11 changed files with 44 additions and 300 deletions

View File

@ -244,4 +244,19 @@ public class Platform {
public String getOsArch() {
return System.getProperty("os.arch");
}
public void symlink(File something, File somewhere) throws IOException, InterruptedException {
Process process = Runtime.getRuntime().exec(new String[]{"ln", "-s", something.getAbsolutePath(), somewhere.getAbsolutePath()}, null, null);
process.waitFor();
}
public void link(File something, File somewhere) throws IOException, InterruptedException {
Process process = Runtime.getRuntime().exec(new String[]{"ln", something.getAbsolutePath(), somewhere.getAbsolutePath()}, null, null);
process.waitFor();
}
public void chmod(File file, int mode) throws IOException, InterruptedException {
Process process = Runtime.getRuntime().exec(new String[]{"chmod", Integer.toOctalString(mode), file.getAbsolutePath()}, null, null);
process.waitFor();
}
}