quark.os.Functions Maven / Gradle / Ivy
/* Quark 1.0.452 run at 2016-11-10 18:39:58.222591 */
package quark.os;
public class Functions {
static datawire_mdk_md.Root root = new datawire_mdk_md.Root();
/**
* Read the entire contents of a file into a String. Assume UTF-8 encoding.
* Returns a FileContents Future instance.
* if result.getError() is null then result.value has the file contents.
*/
public static FileContents readFileAsString(String path) {
FileContents result = new FileContents();
io.datawire.quark.runtime.Os.getFileContents((path), (result));
return result;
}
/**
* Return the path to the current user's home directory
*/
public static String getUserHomeDir() {
return System.getProperty("user.home");
}
}