📄 fileinode.java
字号:
package fileSystem;
public class FileINode extends INode{
private ClientID clientID;
private String time_amend;
int length_file;
public FileINode (int iNode) {
super(iNode);
try{
clientID = new ClientID(in.readInt(), in.readInt());
time_amend = in.readUTF();
length_file = in.readInt();
in.close();
try {
dataBlock = new DataBlock(VirtualData.getBlockInINode(iNode));
int i = 2;
int get = VirtualData.getBlockInINode(iNode, 2);
while ( get != -1) {
dataBlock.addDataBlock(get);
i = i + 1;
get = VirtualData.getBlockInINode(iNode, i);
}
}catch (Exception e) {
dataBlock = null;
}
}catch (Exception e){
}
}
public FileINode (int iNode, String otherName) {
super(iNode);
name = otherName;
try{
clientID = new ClientID(in.readInt(), in.readInt());
time_amend = in.readUTF();
length_file = in.readInt();
in.close();
}catch (Exception e){
}
}
public String getName() {
return name;
}
public int getLength (){
return length_file;
}
public String getCreatTime(){
return time_creat;
}
public String getAccessTime(){
return time_access;
}
public String getAmendTime(){
return time_amend;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -