javax.microedition.io.file
Class FileSystemRegistry

java.lang.Object
  |
  +--javax.microedition.io.file.FileSystemRegistry

public class FileSystemRegistry
extends Object

[Description] The FileSystemRegistry is a central registry for file system listeners interested in the adding and removing (or mounting and unmounting) of file systems on a device.


MOTOROLA and the Stylized M Logo are registered trademarks of Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
© Copyright 2004 Motorola, Inc. All Rights Reserved.

See Also:

Method Summary
static boolean addFileSystemListener(FileSystemListener listener)
          This method is used to register a FileSystemListener that is notified in case of adding and removing a new file system root.
static Enumeration listRoots()
          This method returns the currently mounted root file systems on a device.
static boolean removeFileSystemListener(FileSystemListener listener)
          This method is used to remove a registered FileSystemListener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addFileSystemListener

public static boolean addFileSystemListener(FileSystemListener listener)
This method is used to register a FileSystemListener that is notified in case of adding and removing a new file system root. Multiple file system listeners can be added. If file systems are not supported on a device, false will be returned from the method (this check is performed prior to security checks).

Method/constructor extra info

Parameters:
listener - - The new FileSystemListener to be registered in order to handle adding/removing file system roots.
Returns:
boolean indicating if file system listener was successfully added or not
Throws:
SecurityException - - if application is not given permission to read files.
NullPointerException - - if listener is null.
See Also:

removeFileSystemListener

public static boolean removeFileSystemListener(FileSystemListener listener)
This method is used to remove a registered FileSystemListener. If file systems are not supported on a device, false will be returned from the method.

Method/constructor extra info

Parameters:
listener - - The FileSystemListener to be removed.
Returns:
boolean indicating if file system listener was successfully removed or not
Throws:
NullPointerException - - if listener is null.
See Also:

listRoots

public static Enumeration listRoots()
This method returns the currently mounted root file systems on a device. If there are no roots available on the device, a zero length Enumeration is returned. If file systems are not supported on a device, a zero length Enumeration is also returned (this check is performed prior to security checks).

Method/constructor extra info

Returns:
an Eumeration of mounted file systems.
Throws:
SecurityException - - if application is not given permission to read files.
See Also: