core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java
/**
     * Tests can perform operations on a folder while reading from a different files.
     */
Tests can perform operations on a folder while reading from a different files.
Tests can perform operations on a folder while reading from a different files .
public void testConcurrentReadFolder() throws Exception
    {
        final FileObject file = getReadFolder().resolveFile("file1.txt");
        assertTrue(file.exists());
        final FileObject folder = getReadFolder().resolveFile("dir1");
        assertTrue(folder.exists());
        final InputStream instr = file.getContent().getInputStream();
        try
        {
            folder.exists();
            folder.getType();
            folder.getChildren();
        }
        finally
        {
            instr.close();
        }
    }
public void testConcurrentReadFolder ( ) throws Exception { final FileObject file = getReadFolder ( ) . resolveFile ( "file1.txt" ) ; assertTrue ( file . exists ( ) ) ; final FileObject folder = getReadFolder ( ) . resolveFile ( "dir1" ) ; assertTrue ( folder . exists ( ) ) ; final InputStream instr = file . getContent ( ) . getInputStream ( ) ; try { folder . exists ( ) ; folder . getType ( ) ; folder . getChildren ( ) ; } finally { instr . close ( ) ; } }
Tests can perform operations on a folder while reading from a different files.
Tests can perform operations on a folder while reading from a different files .
// Start reading from the file // Do some operations