core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java
/**
     * Tests that folders have no content.
     */
Tests that folders have no content.
Tests that folders have no content .
public void testFolderContent() throws Exception
    {
        if (getReadFolder().getFileSystem().hasCapability(Capability.DIRECTORY_READ_CONTENT))
        {
            return;
        }
        FileObject folder = getReadFolder().resolveFile("dir1");
        try
        {
            folder.getContent().getInputStream();
            fail();
        }
        catch (FileSystemException e)
        {
            assertSameMessage("vfs.provider/read-not-file.error", folder, e);
        }
    }
public void testFolderContent ( ) throws Exception { if ( getReadFolder ( ) . getFileSystem ( ) . hasCapability ( Capability . DIRECTORY_READ_CONTENT ) ) { return ; } FileObject folder = getReadFolder ( ) . resolveFile ( "dir1" ) ; try { folder . getContent ( ) . getInputStream ( ) ; fail ( ) ; } catch ( FileSystemException e ) { assertSameMessage ( "vfs.provider/read-not-file.error" , folder , e ) ; } }
Tests that folders have no content.
Tests that folders have no content .
// test wont fail // Try getting the content of a folder