📄 inode.java
字号:
package fileSystem;
import java.io.RandomAccessFile;
public abstract class INode {
protected INodeNumber iNodeNumber;
protected String name;
protected int count_connection;
protected String time_creat;
protected String time_access;
protected String isDir;
protected DataBlock dataBlock;
protected RandomAccessFile in;
public INode (int iNode) {
try{
in = new RandomAccessFile("INode" + String.valueOf(iNode) + ".dat", "r");
iNodeNumber = new INodeNumber(in.readInt());
name = in.readUTF();
count_connection = in.readInt();
time_creat = in.readUTF();
time_access = in.readUTF();
isDir = in.readUTF();
}catch (java.io.FileNotFoundException e){
iNodeNumber = null;
name = null;
count_connection = 0;
time_creat = null;
time_access = null;
isDir = null;
}
catch (Exception e){
iNodeNumber = null;
name = null;
count_connection = 0;
time_creat = null;
time_access = null;
isDir = null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -