Example usage for org.apache.commons.vfs FileObject isWriteable

List of usage examples for org.apache.commons.vfs FileObject isWriteable

Introduction

In this page you can find the example usage for org.apache.commons.vfs FileObject isWriteable.

Prototype

public boolean isWriteable() throws FileSystemException;

Source Link

Document

Determines if this file can be written to.

Usage

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadOnlyResolveFileString() throws FileSystemException {
    createRealFileChild();/*from  w w w  . ja  v a  2s.com*/

    final FileObject childFile = readOnlyFile.resolveFile(CHILD_NAME);
    assertNotNull(childFile);
    assertFalse(childFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadOnlyResolveFileStringNameScope() throws FileSystemException {
    createRealFileChild();/*from ww w.ja v a  2 s.  c o m*/

    final FileObject childFile = readOnlyFile.resolveFile(CHILD_NAME, NameScope.CHILD);
    assertNotNull(childFile);
    assertFalse(childFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadOnlyGetChildStringExisting() throws FileSystemException {
    createRealFileChild();/*from   w  w w . j av  a 2  s .  co m*/

    final FileObject childFile = readOnlyFile.getChild(CHILD_NAME);
    assertNotNull(childFile);
    assertFalse(childFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadOnlyGetParent() throws FileSystemException {
    final FileObject parent = readOnlyFile.getParent();
    assertNotNull(parent);/*from   ww  w  .j  a  v a2  s. co m*/
    assertFalse(parent.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadOnlyGetContentGetFile() throws FileSystemException {
    final FileObject sameFile = readOnlyFile.getContent().getFile();
    assertFalse(sameFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadWriteResolveFileString() throws FileSystemException {
    createRealFileChild();/*from   www. j  a  va  2s .c  o m*/

    final FileObject childFile = readWriteFile.resolveFile(CHILD_NAME);
    assertNotNull(childFile);
    assertTrue(childFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadWriteResolveFileStringNameScope() throws FileSystemException {
    createRealFileChild();/* w  w w . j a v  a  2  s. c om*/

    final FileObject childFile = readWriteFile.resolveFile(CHILD_NAME, NameScope.CHILD);
    assertNotNull(childFile);
    assertTrue(childFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadWriteGetChildStringExisting() throws FileSystemException {
    createRealFileChild();/*from   ww  w  .  ja  v  a  2  s  .  c  o m*/

    final FileObject childFile = readWriteFile.getChild(CHILD_NAME);
    assertNotNull(childFile);
    assertTrue(childFile.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testWriteOnlyGetParent() throws FileSystemException {
    final FileObject parent = readWriteFile.getParent();
    assertNotNull(parent);/*from  ww  w.  j  ava  2  s. c o  m*/
    assertTrue(parent.isWriteable());
}

From source file:unitTests.dataspaces.AbstractLimitingFileObjectTest.java

@Test
public void testReadWriteGetContentGetFile() throws FileSystemException {
    final FileObject sameFile = readWriteFile.getContent().getFile();
    assertTrue(sameFile.isWriteable());
}