Package com.xebialabs.overthere

Examples of com.xebialabs.overthere.OverthereFile.canRead()


        }

        assertThat("Expected temporary file to exist after writing to it", tempFile.exists(), equalTo(true));
        assertThat("Expected temporary file to not be a directory", tempFile.isDirectory(), equalTo(false));
        assertThat("Expected temporary file to have the size of the contents written to it", tempFile.length(), equalTo((long) contents.length));
        assertThat("Expected temporary file to be readable", tempFile.canRead(), equalTo(true));
        assertThat("Expected temporary file to be writeable", tempFile.canWrite(), equalTo(true));

        // Windows systems don't support the concept of checking for executability
        if (connection.getHostOperatingSystem() == OperatingSystemFamily.UNIX) {
            assertFalse("Expected temporary file to not be executable", tempFile.canExecute());
View Full Code Here


    try {
      OverthereFile motd = connection.getFile("/etc/motd");
      System.out.println("Length        : " + motd.length());
      System.out.println("Last modified : " + motd.lastModified());
      System.out.println("Exists        : " + motd.exists());
      System.out.println("Can read      : " + motd.canRead());
      System.out.println("Can write     : " + motd.canWrite());
      System.out.println("Can execute   : " + motd.canExecute());
    } finally {
      connection.close();
    }
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.