All Downloads are FREE. Search and download functionalities are using the official Maven repository.

quark.os.Functions Maven / Gradle / Ivy

There is a newer version: 2.0.37
Show newest version
/* 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");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy