Code example for AssetManager

Methods: list

0
    public void assetsPathListing() throws IOException { 
        List<String> files;
        String testPath;
 
        testPath = "";
        files = Arrays.asList(assetManager.list(testPath));
        assertTrue(files.contains("docs"));
        assertTrue(files.contains("assetsHome.txt"));
 
        testPath = "docs";
        files = Arrays.asList(assetManager.list(testPath));
        assertTrue(files.contains("extra"));
 
        testPath = "docs" + sp + "extra";
        files = Arrays.asList(assetManager.list(testPath));
        assertTrue(files.contains("testing"));
 
        testPath = "docs" + sp + "extra" + sp + "testing";
        files = Arrays.asList(assetManager.list(testPath));
        assertTrue(files.contains("hello.txt"));
 
        testPath = "assetsHome.txt";
        files = Arrays.asList(assetManager.list(testPath));
        assertFalse(files.contains(testPath));
 
        testPath = "bogus.file";
        files = Arrays.asList(assetManager.list(testPath));
        assertEquals(0, files.size());
    } 
 
    @Test 
    public void assetsInputStreams() throws IOException { 
Stop searching for code, let great code find you!  Add Codota to your java IDE