FileInfo (Sigar API)
Date: 2010-04-28

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.sigar
Class FileInfo

    java.lang.Object
      org.hyperic.sigar.FileAttrs
          org.hyperic.sigar.FileInfo

All Implemented Interfaces:
  java.io.Serializable

    public class FileInfo

extends FileAttrs
implements java.io.Serializable

See Also:
  Serialized Form

Field Summary
`static int` | `MODE_GEXECUTE` Executable by group.
`static int` | `MODE_GREAD` Readable by group.
`static int` | `MODE_GWRITE` Writable by group.
`static int` | `MODE_UEXECUTE` Executable by user.
`static int` | `MODE_UREAD` Readable by user.
`static int` | `MODE_UWRITE` Writable by user.
`static int` | `MODE_WEXECUTE` Executable by others.
`static int` | `MODE_WREAD` Readable by others.
`static int` | `MODE_WWRITE` Writable by others.
`static int` | `TYPE_BLK` A block device.
`static int` | `TYPE_CHR` A character device.
`static int` | `TYPE_DIR` A directory.
`static int` | `TYPE_LNK` A symbolic link.
`static int` | `TYPE_NOFILE` No file type determined.
`static int` | `TYPE_PIPE` A FIFO / pipe.
`static int` | `TYPE_REG` A regular file.
`static int` | `TYPE_SOCK` A [unix domain] socket.
`static int` | `TYPE_UNKFILE` A file of unknown type.

Constructor Summary
`FileInfo()`

Method Summary
`boolean` | `changed()`
`java.lang.String` | `diff()`
`java.lang.String` | `diff(DirStat stat)`
`java.lang.String` | `diff(FileInfo info)`
`void` | `enableDirStat(boolean value)`
`boolean` | `equals(java.lang.Object o)`
`int` | `getMode()` Convert permissions bit mask to human readable number.
`java.lang.String` | `getName()`
`java.lang.String` | `getPermissionsString()`
`FileInfo` | `getPreviousInfo()`
`char` | `getTypeChar()`
`java.lang.String` | `getTypeString()`
`int` | `hashCode()`
`boolean` | `modified()`
`void` | `stat()`

Methods inherited from class org.hyperic.sigar.FileAttrs
`gather, getAtime, getCtime, getDevice, getGid, getInode, getMtime, getNlink, getPermissions, getSize, getType, getUid, toMap, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### TYPE_NOFILE

    public static final int TYPE_NOFILE

  No file type determined.

  See Also:
    Constant Field Values

### TYPE_REG

    public static final int TYPE_REG

  A regular file.

  See Also:
    Constant Field Values

### TYPE_DIR

    public static final int TYPE_DIR

  A directory.

  See Also:
    Constant Field Values

### TYPE_CHR

    public static final int TYPE_CHR

  A character device.

  See Also:
    Constant Field Values

### TYPE_BLK

    public static final int TYPE_BLK

  A block device.

  See Also:
    Constant Field Values

### TYPE_PIPE

    public static final int TYPE_PIPE

  A FIFO / pipe.

  See Also:
    Constant Field Values

### TYPE_LNK

    public static final int TYPE_LNK

  A symbolic link.

  See Also:
    Constant Field Values

### TYPE_SOCK

    public static final int TYPE_SOCK

  A [unix domain] socket.

  See Also:
    Constant Field Values

### TYPE_UNKFILE

    public static final int TYPE_UNKFILE

  A file of unknown type.

  See Also:
    Constant Field Values

### MODE_UREAD

    public static final int MODE_UREAD

  Readable by user.

  See Also:
    Constant Field Values

### MODE_UWRITE

    public static final int MODE_UWRITE

  Writable by user.

  See Also:
    Constant Field Values

### MODE_UEXECUTE

    public static final int MODE_UEXECUTE

  Executable by user.

  See Also:
    Constant Field Values

### MODE_GREAD

    public static final int MODE_GREAD

  Readable by group.

  See Also:
    Constant Field Values

### MODE_GWRITE

    public static final int MODE_GWRITE

  Writable by group.

  See Also:
    Constant Field Values

### MODE_GEXECUTE

    public static final int MODE_GEXECUTE

  Executable by group.

  See Also:
    Constant Field Values

### MODE_WREAD

    public static final int MODE_WREAD

  Readable by others.

  See Also:
    Constant Field Values

### MODE_WWRITE

    public static final int MODE_WWRITE

  Writable by others.

  See Also:
    Constant Field Values

### MODE_WEXECUTE

    public static final int MODE_WEXECUTE

  Executable by others.

  See Also:
    Constant Field Values

Constructor Detail

### FileInfo

    public FileInfo()

Method Detail

### getTypeString

    public java.lang.String getTypeString()

### getTypeChar

    public char getTypeChar()

### getName

    public java.lang.String getName()

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### getPermissionsString

    public java.lang.String getPermissionsString()

### getMode

    public int getMode()

  Convert permissions bit mask to human readable number. Example: `MODE_UREAD|MODE_UWRITE|MODE_GREAD|MODE_WREAD` converts to `644`.

  Returns:
    The file permissions mode.

### enableDirStat

    public void enableDirStat(boolean value)

### diff

    public java.lang.String diff()

### diff

    public java.lang.String diff(DirStat stat)

### diff

    public java.lang.String diff(FileInfo info)

### getPreviousInfo

    public FileInfo getPreviousInfo()

### modified

    public boolean modified()
                     throws SigarException,
                            SigarFileNotFoundException

  Throws:
    `SigarException`
    `SigarFileNotFoundException`

### changed

    public boolean changed()
                    throws SigarException,
                           SigarFileNotFoundException

  Throws:
    `SigarException`
    `SigarFileNotFoundException`

### stat

    public void stat()
              throws SigarException,
                     SigarFileNotFoundException

  Throws:
    `SigarException`
    `SigarFileNotFoundException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2004-2009 Hyperic. All Rights Reserved.