Examples of CatalogFolder


Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

public class CatalogFolderTest {

    @Test
    public void testCatalogFolderIntCatalogNodeId() {
        CatalogFolder folder = new CatalogFolder(0, CatalogNodeId.HFSPLUS_ROOT_CNID);
        assertNotNull(folder);
        assertEquals(0, folder.getValence());
        assertEquals(2, folder.getFolderId().getId());
        folder = new CatalogFolder(folder.getBytes());
        assertNotNull(folder);
        assertEquals(0, folder.getValence());
        assertEquals(2, folder.getFolderId().getId());

    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

    }

    @Test
    public void testCatalogFolder() {
        CatalogFolder folder = new CatalogFolder(
            new byte[]{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -53, 96, 7, 78, -53, 96, 7, 78, -53, 96, 7, 78, 0, 0, 0, 0,
                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 2, 0, 9, 0,
                116, 0, 101, 0, 115, 0, 116, 0, 100, 0, 114, 0, 105, 0, 118, 0, 101, 0, 3});
        assertNotNull(folder);
        assertEquals(0, folder.getValence());
        assertEquals(2, folder.getFolderId().getId());
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

    public long getLastModified() throws IOException {
        if (isFile()) {
            CatalogFile catalogFile = new CatalogFile(getData());
            return catalogFile.getContentModDate();
        } else {
            CatalogFolder catalogFolder = new CatalogFolder(getData());
            return catalogFolder.getContentModDate();
        }
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

    public CatalogFolder createCatalogFolder() {
        if (isFile()) {
            throw new IllegalStateException("Attempted to create a catalog folder but this entry is not a directory!");
        }

        return new CatalogFolder(getData());
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

        if (isFile()) {
            CatalogFile catalogFile = new CatalogFile(getData());
            // catalogFile.setContentModDate();
            throw new UnsupportedOperationException("Not implemented yet.");
        } else {
            CatalogFolder catalogFolder = new CatalogFolder(getData());
            catalogFolder.setContentModDate(lastModified);
        }
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

    public long getCreated() throws IOException {
        if (isFile()) {
            CatalogFile catalogFile = new CatalogFile(getData());
            return catalogFile.getCreateDate();
        } else {
            CatalogFolder catalogFolder = new CatalogFolder(getData());
            return catalogFolder.getCreateDate();
        }
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

    public long getLastAccessed() throws IOException {
        if (isFile()) {
            CatalogFile catalogFile = new CatalogFile(getData());
            return catalogFile.getAccessDate();
        } else {
            CatalogFolder catalogFolder = new CatalogFolder(getData());
            return catalogFolder.getAccessDate();
        }
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.catalog.CatalogFolder

     */
    private CatalogFolder folder;

    public HfsPlusDirectory(HfsPlusEntry entry) {
        this.entry = entry;
        this.folder = new CatalogFolder(entry.getData());
        this.entries = FSEntryTable.EMPTY_TABLE;
    }
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.