|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrossi.fstools.fs.ext2fs.DirEntry
Representation of a directory entry.
On disk the directory entry looks like this:
31 24 16 8 0
--------------------------------------
0000 | Inode |
--------------------------------------
0004 | Record Len |NameLen | Type |
--------------------------------------
0008 | Name... |
--------------------------------------
| Field Summary | |
static int |
EXT2_FT_BLKDEV
Block device type |
static int |
EXT2_FT_CHRDEV
Character device type |
static int |
EXT2_FT_DIR
Directory type |
static int |
EXT2_FT_FIFO
Fifo type |
static int |
EXT2_FT_REG_FILE
Regular file type |
static int |
EXT2_FT_SOCK
Socket type |
static int |
EXT2_FT_SYMLINK
Symlink type |
static int |
EXT2_FT_UNKNOWN
File type is unknown |
protected long |
inode
|
protected java.lang.String |
name
|
protected int |
nameLen
|
protected int |
recordLen
|
protected int |
type
|
| Constructor Summary | |
DirEntry()
|
|
| Method Summary | |
int |
getDataSize()
Get the size of this DirEntry. |
long |
getInode()
Get the Inode number associated with this direntry. |
java.lang.String |
getName()
|
int |
getNameLen()
Get the length of the name in this record. |
int |
getRecordLen()
Get the length of this record. |
int |
getType()
Get the type of this file for EXT3 filesystem which support it. |
void |
loadFromBuffer(byte[] buffer,
int offset)
Loads the object from a memory buffer |
void |
setInode(long aInode)
|
void |
setName(java.lang.String aName)
|
void |
setNameLen(int aNameLen)
|
void |
setRecordLen(int aRecordLen)
|
void |
setType(int aType)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected long inode
protected int recordLen
protected int nameLen
protected int type
protected java.lang.String name
public static final int EXT2_FT_UNKNOWN
public static final int EXT2_FT_REG_FILE
public static final int EXT2_FT_DIR
public static final int EXT2_FT_CHRDEV
public static final int EXT2_FT_BLKDEV
public static final int EXT2_FT_FIFO
public static final int EXT2_FT_SOCK
public static final int EXT2_FT_SYMLINK
| Constructor Detail |
public DirEntry()
| Method Detail |
public int getDataSize()
getDataSize in interface DiskStructurepublic long getInode()
public void setInode(long aInode)
public int getRecordLen()
public void setRecordLen(int aRecordLen)
public int getNameLen()
public void setNameLen(int aNameLen)
public java.lang.String getName()
public void setName(java.lang.String aName)
public int getType()
public void setType(int aType)
public void loadFromBuffer(byte[] buffer,
int offset)
throws FsException
DiskStructure
loadFromBuffer in interface DiskStructurebuffer - a byte[] containing data to be read in populating the objectoffset - a int indicating the offset within the buffer to start parsing.
FsException - if a parse error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||