Package org.jnode.fs.ntfs

Examples of org.jnode.fs.ntfs.NTFSFileSystemType


    public void testExtremeFragmentation() {
        System.out.println("NTFS : Test extreme fragmentation (" + TEST_IMAGE_FILENAME_1 + ").");
        try {
            File file = new File(TEST_IMAGE_FILENAME_1);
            Device device = new FileDevice(file, "r");
            FileSystem<?> fileSystem = new NTFSFileSystemType().create(device, true);
            FSDirectory root = fileSystem.getRootEntry().getDirectory();

            // Check the big file.  Every byte should be readable as zero, hopefully.
            FSFile bigFile = root.getEntry("bigfile.dat").getFile();
            int increment = 1024 * 1024;
 
View Full Code Here


    public void testSparseFiles() {
        System.out.println("NTFS : Test sparse file (" + TEST_IMAGE_FILENAME_2 + ").");
        try {
            File file = new File(TEST_IMAGE_FILENAME_2);
            Device device = new FileDevice(file, "r");
            FileSystem<?> fileSystem = new NTFSFileSystemType().create(device, true);
            FSDirectory root = fileSystem.getRootEntry().getDirectory();

            // The first file has 256 bytes of real data at the front, and the rest is sparse.
            byte[] expectedContents = new byte[10240];
            for (int i = 0; i < 256; i++) {
View Full Code Here

            System.exit(-1);
        }

        try {
            final FileSystemService fSS = InitialNaming.lookup(FileSystemService.NAME);
            NTFSFileSystemType type = fSS.getFileSystemType(NTFSFileSystemType.ID);
            NTFSfs = new NTFSFileSystem(fd, false, type);
        } catch (FileSystemException e) {
            System.out.println("error when constructing Ext2FileSystem");
            e.printStackTrace();
            System.exit(-1);
View Full Code Here

    @Test
    public void testReadSmallDisk() throws Exception {

        device = new FileDevice(FileSystemTestUtils.getTestFile("test/fs/ntfs/test.ntfs"), "r");
        NTFSFileSystemType type = fss.getFileSystemType(NTFSFileSystemType.ID);
        NTFSFileSystem fs = type.create(device, true);

        String expectedStructure =
            "type: NTFS vol: total:104857600 free:102283264\n" +
                "  .; \n" +
                "    $AttrDef; 2560; ad617ac3906958de35eacc3d90d31043\n" +
View Full Code Here

    @Test
    @Ignore
    public void testReadCompressedDisk() throws Exception {

        device = new FileDevice(FileSystemTestUtils.getTestFile("test/fs/ntfs/compressed.dd"), "r");
        NTFSFileSystemType type = fss.getFileSystemType(NTFSFileSystemType.ID);
        NTFSFileSystem fs = type.create(device, true);

        String expectedStructure =
            "type: NTFS vol:COMPRESS total:26214400 free:15031296\n" +
                "  .; \n" +
                "    OBJS2.PRS; 57439; 46d0c5fe8dd36c0f1ecc042a38188740\n" +
View Full Code Here

TOP

Related Classes of org.jnode.fs.ntfs.NTFSFileSystemType

Copyright © 2018 www.massapicom. 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.