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

(fs) Files.isReadable slow on Windows

XMLWordPrintable

    • b55
    • generic
    • generic
    • Not verified

        Checking file access on Windows is expensive because it requires reading the DACL and computing the effective access to the file. To bypass this, the checkAccess implementation on Windows has a fast path for the check read case but unfortunately Files.isReadable isn't using that fast path. This has been reported here:

        http://mail.openjdk.java.net/pipermail/nio-dev/2012-May/001667.html

        The workaround for the short is to replace Files.isReadbale(path) with path.getFileSystem().provider().checkAccess(path).

              khazra Kurchi Subhra Hazra
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: