Code example for URI

Methods: getPath

    private TFiles() { 
        // Do not instantiate 
    public static TFile tFile(URI uri) {
        if (uri.getPath() != null) {
            // if the URI has a path, this means it is a real file, use the detection of the path, and not look at the scheme 
            return new TFile(uri.getPath());
        } else { 
            return new TFile(uri);
    public static void umountQuietly(TFile tFile) {
        try { 
            if (tFile.isArchive() && tFile.getEnclArchive() == null) {
        } catch (FsSyncException e) {
            logger.error("Could not umount {}, continuing", tFile);
Stop searching for code, let great code find you!  Add Codota to your java IDE