|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrossi.fstools.fs.fatfs.FatDirEntry
Representation of a FAT directory entry.
On disk the superblock looks like this:
31 24 16 8 0
--------------------------------------
0000 | Name |
--------------------------------------
0004 | Name |
--------------------------------------
0008 | Ext |Attr |
--------------------------------------
000C | lcase | ctimems | CTime |
--------------------------------------
0010 | CDate | ADate |
--------------------------------------
0014 | Start High | Time |
--------------------------------------
0018 | Date | Start |
--------------------------------------
001C | Size |
--------------------------------------
| Field Summary | |
protected int |
adate
Access date in msdos format. |
protected byte |
attr
Attributes. |
static int |
ATTR_ARCH
Arhive attribute. |
static int |
ATTR_DIR
Directory attribute. |
static int |
ATTR_HIDDEN
Hidden attribute. |
static int |
ATTR_LFN
Long filename indicator for VFAT. |
static int |
ATTR_NONE
No attribute bits. |
static int |
ATTR_RO
read-only attribute. |
static int |
ATTR_SYS
System attribute. |
static int |
ATTR_VOLUME
Volume attribute. |
static int |
CASE_LOWER_BASE
Base of shortname is in lowercase. |
static int |
CASE_LOWER_EXT
Ext of shortname is in lowercase. |
protected int |
cdate
Creation date in msdos format. |
protected int |
ctime
Creation time in msdos format. |
protected int |
ctimems
Creation time milliseconds. |
protected int |
date
Modification date. |
protected byte[] |
ext
Three byte extension of the short name. |
protected byte |
hashValue
Hash of the short name. |
protected byte |
lcase
Lower case indicator for Windows NT. |
protected java.lang.String |
longName
Long filename. |
protected byte[] |
name
First 8 bytes of the short name. |
protected long |
size
File size. |
protected int |
start
Low 16 bits of starting cluster. |
protected int |
starthi
High 16 bits of the starting cluster for FAT32. |
protected int |
time
Modification time. |
| Fields inherited from interface rossi.fstools.fs.Inode |
BLOCKDEV_MODE, CHARDEV_MODE, DIRECTORY_MODE, FIFO_MODE, FILE_MODE, FILETYPE_MASK, SOCKET_MODE, SYMLINK_MODE |
| Constructor Summary | |
FatDirEntry()
Default constructor. |
|
| Method Summary | |
protected int |
date_dos2unix(int time,
int date)
Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). |
long |
getAccessTime()
Get the time the data was last accessed. |
int |
getAdate()
Get the last access date. |
byte |
getAttr()
Get the attributes for this file. |
int |
getCdate()
Get the creation date. |
long |
getChangedTime()
Get the time this Inode metadata was last changed. |
int |
getCtime()
Get the creation time of day. |
int |
getCtimems()
Get the creation time milliseconds. |
int |
getDataSize()
Get the size in bytes of the structure. |
int |
getDate()
Get the last modified date. |
byte[] |
getExt()
Get the short name extension. |
long |
getGroupId()
Get the group id of the object's owner. |
byte |
getHashValue()
Get the hash value of the short name. |
byte |
getLcase()
Get the lowercase indicator. |
java.lang.String |
getLongName()
Get the long filename. |
int |
getMode()
Encode the FAT attributes into the unix mode field. |
long |
getModifyTime()
Get the time the data was last modified. |
java.lang.String |
getName()
Return the long name if it exists, short name otherwise. |
byte[] |
getNamePrefix()
Get the short name prefix. |
long |
getNumLinks()
Get the number of hard links to this file. |
java.lang.String |
getShortName()
Get the short filename. |
long |
getSize()
Get the size of the data associated with the object. |
int |
getStart()
Get the lower 16 bits of the starting cluster. |
int |
getStartHi()
Get the high 16 bits of the starting cluster for FAT32 only. |
int |
getTime()
Get the last modified time of day. |
long |
getUserId()
Get the user id of the object's owner. |
void |
loadFromBuffer(byte[] buffer,
int offset)
Loads the object from a memory buffer |
void |
setAccessTime(long aAccessTime)
Not supported. |
void |
setAdate(int aAdate)
|
void |
setAttr(byte aAttr)
|
void |
setCdate(int aCdate)
|
void |
setChangedTime(long aChangedTime)
Not supported. |
void |
setCtime(int aCtime)
|
void |
setCtimems(int aCtimems)
|
void |
setDate(int aDate)
|
void |
setExt(byte[] aExt)
|
void |
setGroupId(long aGroupId)
Not supported. |
void |
setLcase(byte aLcase)
|
void |
setLongName(java.lang.String aLongName)
|
void |
setMode(int aMode)
Not supported. |
void |
setModifyTime(long aModifyTime)
Not supported. |
void |
setNamePrefix(byte[] aName)
|
void |
setNumLinks(long aNumLinks)
Not supported. |
void |
setSize(long aSize)
|
void |
setStart(int aStart)
|
void |
setStartHi(int aStarthi)
|
void |
setTime(int aTime)
|
void |
setUserId(long aUserId)
Not supported. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected byte[] name
protected byte[] ext
protected byte attr
protected byte lcase
protected int ctimems
protected int ctime
protected int cdate
protected int adate
protected int starthi
protected int time
protected int date
protected int start
protected long size
protected byte hashValue
protected java.lang.String longName
public static final int ATTR_NONE
public static final int ATTR_RO
public static final int ATTR_HIDDEN
public static final int ATTR_SYS
public static final int ATTR_VOLUME
public static final int ATTR_DIR
public static final int ATTR_ARCH
public static final int ATTR_LFN
public static final int CASE_LOWER_BASE
public static final int CASE_LOWER_EXT
| Constructor Detail |
public FatDirEntry()
| Method Detail |
public int getDataSize()
DiskStructure
getDataSize in interface DiskStructurepublic byte[] getNamePrefix()
public void setNamePrefix(byte[] aName)
public byte[] getExt()
public void setExt(byte[] aExt)
public byte getAttr()
public void setAttr(byte aAttr)
public byte getLcase()
public void setLcase(byte aLcase)
public int getCtimems()
public void setCtimems(int aCtimems)
public int getCtime()
public void setCtime(int aCtime)
public int getCdate()
public void setCdate(int aCdate)
public int getAdate()
public void setAdate(int aAdate)
public int getStartHi()
public void setStartHi(int aStarthi)
public int getTime()
public void setTime(int aTime)
public int getDate()
public void setDate(int aDate)
public int getStart()
public void setStart(int aStart)
public long getSize()
Inode
getSize in interface Inodepublic void setSize(long aSize)
setSize in interface Inodepublic int getMode()
The encoding goes as follows. This is somewhat arbitrary.
If attribute State Add mode bits ATTR_DIR set Inode.DIRECORY_MODE ATTR_DIR clear Inode.FILE_MODE ATTR_RO clear ugo+w ATTR_HIDDEN clear u+r ATTR_SYS clear g+r ATTR_ARCHIVE clear o+r ATTR_VOLUME set o+x
getMode in interface Inodepublic void setMode(int aMode)
setMode in interface InodeaMode - the mode.Inode.getMode()public long getNumLinks()
Inode
getNumLinks in interface Inodepublic void setNumLinks(long aNumLinks)
setNumLinks in interface InodeaNumLinks - number of links.public long getUserId()
Inode
getUserId in interface Inodepublic void setUserId(long aUserId)
setUserId in interface InodeaUserId - user idpublic long getGroupId()
Inode
getGroupId in interface Inodepublic void setGroupId(long aGroupId)
setGroupId in interface InodeaGroupId - group idpublic long getAccessTime()
Inode
getAccessTime in interface Inodepublic void setAccessTime(long aAccessTime)
setAccessTime in interface InodeaAccessTime - accessTimepublic long getModifyTime()
Inode
getModifyTime in interface Inodepublic void setModifyTime(long aModifyTime)
setModifyTime in interface InodeaModifyTime - modifyTimepublic long getChangedTime()
Inode
getChangedTime in interface Inodepublic void setChangedTime(long aChangedTime)
setChangedTime in interface InodeaChangedTime - changedTime
protected int date_dos2unix(int time,
int date)
time - msdos timedate - msdos date
public byte getHashValue()
public java.lang.String getLongName()
public void setLongName(java.lang.String aLongName)
public java.lang.String getName()
public java.lang.String getShortName()
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 | |||||||||