rossi.fstools.fs
Interface Inode

All Known Implementing Classes:
Ext2Inode, FatDirEntry, StatDataItem

public interface Inode

An inode contains meta-data about a file system object.


Field Summary
static int BLOCKDEV_MODE
           
static int CHARDEV_MODE
           
static int DIRECTORY_MODE
           
static int FIFO_MODE
           
static int FILE_MODE
          A regular file
static int FILETYPE_MASK
          Mask for the portion of mode that determines object type.
static int SOCKET_MODE
           
static int SYMLINK_MODE
           
 
Method Summary
 long getAccessTime()
          Get the time the data was last accessed.
 long getChangedTime()
          Get the time this Inode metadata was last changed.
 long getGroupId()
          Get the group id of the object's owner.
 int getMode()
          Get the mode of the object.
 long getModifyTime()
          Get the time the data was last modified.
 long getNumLinks()
          Get the number of hard links to this file.
 long getSize()
          Get the size of the data associated with the object.
 long getUserId()
          Get the user id of the object's owner.
 void setAccessTime(long aAccessTime)
           
 void setChangedTime(long aChangedTime)
           
 void setGroupId(long aGroupId)
           
 void setMode(int aMode)
          Set the mode.
 void setModifyTime(long aModifyTime)
           
 void setNumLinks(long aNumLinks)
           
 void setSize(long aSize)
           
 void setUserId(long aUserId)
           
 

Field Detail

FILETYPE_MASK

public static final int FILETYPE_MASK
Mask for the portion of mode that determines object type.

See Also:
Constant Field Values

DIRECTORY_MODE

public static final int DIRECTORY_MODE
See Also:
Constant Field Values

CHARDEV_MODE

public static final int CHARDEV_MODE
See Also:
Constant Field Values

BLOCKDEV_MODE

public static final int BLOCKDEV_MODE
See Also:
Constant Field Values

FILE_MODE

public static final int FILE_MODE
A regular file

See Also:
Constant Field Values

FIFO_MODE

public static final int FIFO_MODE
See Also:
Constant Field Values

SYMLINK_MODE

public static final int SYMLINK_MODE
See Also:
Constant Field Values

SOCKET_MODE

public static final int SOCKET_MODE
See Also:
Constant Field Values
Method Detail

getMode

public int getMode()
Get the mode of the object. The least significant 12 bits control the object's access permissions. The next 4 bits control the type of the object.

Returns:
the mode

setMode

public void setMode(int aMode)
Set the mode.

Parameters:
aMode - the mode.
See Also:
getMode()

getNumLinks

public long getNumLinks()
Get the number of hard links to this file. A value of zero indicates that the object is deleted. A hard link is a directory entry pointing directly at this object (not via symlinks).

Returns:
the number of links

setNumLinks

public void setNumLinks(long aNumLinks)

getUserId

public long getUserId()
Get the user id of the object's owner.

Returns:
the user id

setUserId

public void setUserId(long aUserId)

getGroupId

public long getGroupId()
Get the group id of the object's owner.

Returns:
the group id

setGroupId

public void setGroupId(long aGroupId)

getSize

public long getSize()
Get the size of the data associated with the object. This is mostly meaningful with normal files.

Returns:
the size

setSize

public void setSize(long aSize)

getAccessTime

public long getAccessTime()
Get the time the data was last accessed.

Returns:
the access time.

setAccessTime

public void setAccessTime(long aAccessTime)

getModifyTime

public long getModifyTime()
Get the time the data was last modified.

Returns:
the access time.

setModifyTime

public void setModifyTime(long aModifyTime)

getChangedTime

public long getChangedTime()
Get the time this Inode metadata was last changed.

Returns:
long

setChangedTime

public void setChangedTime(long aChangedTime)