ext2filesystemtype.java
来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 52 行
JAVA
52 行
/*
* $Id: Ext2FileSystemType.java,v 1.4 2004/02/02 00:57:22 gbin Exp $
*/
package org.jnode.fs.ext2;
import org.jnode.driver.Device;
import org.jnode.fs.FileSystem;
import org.jnode.fs.FileSystemException;
import org.jnode.fs.FileSystemType;
import org.jnode.fs.partitions.PartitionTableEntry;
import org.jnode.fs.partitions.ibm.IBMPartitionTableEntry;
import org.jnode.fs.partitions.ibm.IBMPartitionTypes;
/**
* @author Andras Nagy
*/
public class Ext2FileSystemType implements FileSystemType {
public static final String NAME = "EXT2";
/**
* @see org.jnode.fs.FileSystemType#create(Device)
*/
public FileSystem create(Device device) throws FileSystemException {
return new Ext2FileSystem(device);
}
/**
* @see org.jnode.fs.FileSystemType#getName()
*/
public String getName() {
return NAME;
}
/**
* @see org.jnode.fs.FileSystemType#supports(PartitionTableEntry, byte[])
*/
public boolean supports(PartitionTableEntry pte, byte[] firstSector) {
if (pte instanceof IBMPartitionTableEntry) {
return (((IBMPartitionTableEntry)pte).getSystemIndicator() == IBMPartitionTypes.PARTTYPE_LINUXNATIVE);
} else
return false;
}
/**
* @see org.jnode.fs.FileSystemType#format(org.jnode.driver.Device, java.lang.Object)
*/
public FileSystem format(Device device, Object specificOptions) throws FileSystemException {
throw new FileSystemException("Not ye implemented");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?