Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4168045

File.isReady() - method to avoid media-insertion dialogs

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0, 1.3.1
    • core-libs
    • x86
    • windows_nt, windows_2000

      Name: dm26566 Date: 08/20/98


      java.io.File should have a method isReady() or
      isDeviceReady() so that the OS doesn't launch
      the infamous Abort/Retry/Cancel dialog when
      calling such methods as listFiles(), exists(),
      or canRead().

      For example if you write a JExplorer (similar
      to Windows Explorer) there is no way to listRoots() without throwing the
      NullPointerException or
      canRead() without forcing the user to answer
      the dialog for devices that are not ready.

      Under Unix is the device is not mounted it's not
      a root/subdirectory so this issue will never come
      up. However with listRoots() (presumeable for
      Windows machines) it is an issue.
      (Review ID: 37315)
      ======================================================================

            alanb Alan Bateman
            dmcduffisunw Dale Mcduffie (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: