Added Process.getWorkingDirectory() and setWorkingDirectory() and posix implementation.

This commit is contained in:
Adam Murdoch
2013-01-26 17:51:10 +11:00
parent 47f914b49d
commit 64a738008e
9 changed files with 151 additions and 60 deletions

View File

@@ -16,6 +16,8 @@
package net.rubygrapefruit.platform;
import java.io.File;
/**
* Functions to query and modify a process' state.
*/
@@ -28,4 +30,20 @@ public interface Process extends NativeIntegration {
*/
@ThreadSafe
int getProcessId() throws NativeException;
/**
* Returns the process' current working directory.
*
* @throws NativeException On failure.
*/
@ThreadSafe
File getWorkingDirectory() throws NativeException;
/**
* Sets the process' working directory.
*
* @throws NativeException On failure.
*/
@ThreadSafe
void setWorkingDirectory(File directory) throws NativeException;
}