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

## org.eclipse.update.configuration
Class LocalSystemInfo

    java.lang.Object
      org.eclipse.update.configuration.LocalSystemInfo

public class LocalSystemInfo
extends Object

Utility class providing local file system information. The class attempts to load a native library implementation of its methods. If successful, the method calls are delegated to the native implementation. Otherwise a default non-native implementation is used. *

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
  2.0
See Also:
  `ILocalSystemInfoListener`

Field Summary
`static long` | `SIZE_UNKNOWN` Indicates the amount of available free space is not known
`static int` | `VOLUME_ADDED` Indicates a new volume has been added
`static int` | `VOLUME_CDROM` Indicates a cdrom volume (compact disc)
`static int` | `VOLUME_CHANGED` Indicates a volume has been changed
`static int` | `VOLUME_FIXED` Indicates the volume is fixed (hard drive)
`static int` | `VOLUME_FLOPPY_3` Indicates the volume is removable (floppy disk 3 1/2)
`static int` | `VOLUME_FLOPPY_5` Indicates the volume is removable (floppy disk 5 1/4)
`static int` | `VOLUME_INVALID_PATH` Indicates the volume could not be determined from path
`static int` | `VOLUME_RAMDISK` Indicates a ramdisk volume (memory)
`static int` | `VOLUME_REMOTE` Indicates a remote (network) volume
`static int` | `VOLUME_REMOVABLE` Indicates the volume is removable (other than floppy disk)
`static int` | `VOLUME_REMOVED` Indicates a volume has been removed
`static int` | `VOLUME_UNKNOWN` Indicates the volume type is not known

Constructor Summary
`LocalSystemInfo()`

Method Summary
`static void` | `addInfoListener(ILocalSystemInfoListener listener)` Add local system change listener.
`static void` | `fireSystemInfoChanged(IVolume volume, int changeType)` Notify listeners of change.
`static long` | `getFreeSpace(File path)` Determines available free space on a volume.
`static IVolume[]` | `getVolumes()` Lists the file system volume.
`static void` | `removeInfoListener(ILocalSystemInfoListener listener)` Remove local system change listener

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

Field Detail

### SIZE_UNKNOWN

    public static final long SIZE_UNKNOWN

  Indicates the amount of available free space is not known

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    `getFreeSpace(File)`, Constant Field Values

### VOLUME_UNKNOWN

    public static final int VOLUME_UNKNOWN

  Indicates the volume type is not known

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    `LocalSystemInfo#getType(File)`, Constant Field Values

### VOLUME_INVALID_PATH

    public static final int VOLUME_INVALID_PATH

  Indicates the volume could not be determined from path

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_REMOVABLE

    public static final int VOLUME_REMOVABLE

  Indicates the volume is removable (other than floppy disk)

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_FIXED

    public static final int VOLUME_FIXED

  Indicates the volume is fixed (hard drive)

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_REMOTE

    public static final int VOLUME_REMOTE

  Indicates a remote (network) volume

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_CDROM

    public static final int VOLUME_CDROM

  Indicates a cdrom volume (compact disc)

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_RAMDISK

    public static final int VOLUME_RAMDISK

  Indicates a ramdisk volume (memory)

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_FLOPPY_5

    public static final int VOLUME_FLOPPY_5

  Indicates the volume is removable (floppy disk 5 1/4)

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_FLOPPY_3

    public static final int VOLUME_FLOPPY_3

  Indicates the volume is removable (floppy disk 3 1/2)

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_ADDED

    public static final int VOLUME_ADDED

  Indicates a new volume has been added

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_REMOVED

    public static final int VOLUME_REMOVED

  Indicates a volume has been removed

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

### VOLUME_CHANGED

    public static final int VOLUME_CHANGED

  Indicates a volume has been changed

  Since:
    2.0

    Note: This field is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    Constant Field Values

Constructor Detail

### LocalSystemInfo

    public LocalSystemInfo()

Method Detail

### getFreeSpace

    public static long getFreeSpace(File path)

  Determines available free space on a volume. Returns the amount of free space available to this user on the volume containing the specified path. The method takes into account any space quotas or other native mechanisms that may restrict space usage on a given volume.

  Parameters:
    `path` - file path. May contain path elements beyond the volume "root"
  Returns:
    the amount of free space available (in units of Kbyte), or an indication the size is not known
  Since:
    2.0

    Note: This method is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

  See Also:
    `SIZE_UNKNOWN`

### getVolumes

    public static IVolume[] getVolumes()

  Lists the file system volume.

  Returns:
    array of volume representing mount points, or `null` if none found
  Since:
    2.0

    Note: This method is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### addInfoListener

    public static void addInfoListener(ILocalSystemInfoListener listener)

  Add local system change listener. Allows a listener to be added for monitoring changes in the local system information. The listener is notified each time there are relevant volume changes detected. This specifically includes changes to the list of volumes as a result of removable drive/ media operations (eg. CD insertion, removal), and changes to volume mount structure.

  Parameters:
    `listener` - change listener
  Since:
    2.0

    Note: This method is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### removeInfoListener

    public static void removeInfoListener(ILocalSystemInfoListener listener)

  Remove local system change listener

  Parameters:
    `listener` - change listener
  Since:
    2.0

    Note: This method is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### fireSystemInfoChanged

    public static void fireSystemInfoChanged(IVolume volume,
                                             int changeType)

  Notify listeners of change.

  Parameters:
    `volume` - the volume representing the change file system structure. Any current paths beyond the specified "root" file of the volume are assumed to be invalidated.
    `changeType` - type of the change that occured.
  See Also:
    `VOLUME_ADDED`, `VOLUME_REMOVED`, `

    Note: This method is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

    `

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

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.