Examples of toRealPath()


Examples of java.nio.file.Path.toRealPath()

      fail();
    } catch (ClosedWatchServiceException expected) {
    }

    try {
      p.toRealPath();
      fail();
    } catch (ClosedFileSystemException expected) {
    }

    // While technically (according to the FileSystem.close() spec) all methods on Path should
View Full Code Here

Examples of org.uberfire.java.nio.file.Path.toRealPath()

        assertThat( path.getRoot().toRealPath().toUri().toString() ).isEqualTo( "git://master@new-get-repo-name/" );
        assertThat( path.toString() ).isEqualTo( "/home" );

        final Path pathRelative = PROVIDER.getPath( URI.create( "git://master@new-get-repo-name/:home" ) );
        assertThat( pathRelative ).isNotNull();
        assertThat( pathRelative.toRealPath().toUri().toString() ).isEqualTo( "git://master@new-get-repo-name/:home" );
        assertThat( pathRelative.getRoot().toString() ).isEqualTo( "" );
        assertThat( pathRelative.toString() ).isEqualTo( "home" );
    }

    @Test
View Full Code Here

Examples of org.uberfire.java.nio.file.Path.toRealPath()

        assertThat( uri ).isNotNull();
        assertThat( uri.toString() ).isEqualTo( "default:///path/to/file.txt" );

        final Path realPath = path.toRealPath();
        assertThat( realPath ).isNotNull();
        assertThat( realPath.toRealPath() ).isEqualTo( realPath );
        assertThat( realPath.toUri() ).isNotNull();
        assertThat( realPath.toUri().toString() ).isEqualTo( "file:///path/to/file.txt" );
    }

    @Test
View Full Code Here

Examples of org.uberfire.java.nio.file.Path.toRealPath()

        assertThat( path ).isNotNull();
        assertThat( uri ).isNotNull();

        assertThat( uri.toString() ).isEqualTo( "default://" + DEFAULT_PATH + "path/to/file.txt" );

        assertThat( path.toRealPath().toUri().toString() ).isEqualTo( "file://" + DEFAULT_PATH + "path/to/file.txt" );
    }

    @Test
    public void testAbsoluteToURIWindows() throws Exception {
        final FileSystemProvider fsprovider = mock( FileSystemProvider.class );
View Full Code Here

Examples of org.uberfire.java.nio.file.Path.toRealPath()

        assertThat( uri.toString() ).isEqualTo( "default:///c:/path/to/file.txt" );

        final Path realPath = path.toRealPath();

        assertThat( realPath ).isNotNull();
        assertThat( realPath.toRealPath() ).isEqualTo( realPath );
        assertThat( realPath.toUri() ).isNotNull();
        assertThat( realPath.toUri().toString() ).isEqualTo( "file:///c:/path/to/file.txt" );
    }

    @Test
View Full Code Here

Examples of org.uberfire.java.nio.file.Path.toRealPath()

        assertThat( path ).isNotNull();
        assertThat( uri ).isNotNull();

        assertThat( uri.toString() ).isEqualTo( "default:///" + "C:" + DEFAULT_PATH + "path/to/file.txt" );

        assertThat( path.toRealPath().toUri().toString() ).isEqualTo( "file:///" + "C:" + DEFAULT_PATH + "path/to/file.txt" );
    }

    @Test
    public void testResolve() {
        final FileSystemProvider fsprovider = mock( FileSystemProvider.class );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.