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

(fs) UnixFileSystemProvider.implDelete could save a syscall in some cases

XMLWordPrintable

    • In Review
    • x86_64
    • linux, os_x, aix

      A DESCRIPTION OF THE PROBLEM :
      implDelete needs to use unlink(2) on files and rmdir(2) on directories. It currently stats the target to determine which to use. Another option would be to unconditionally first try unlink(2) and then fallback to rmdir(2) if unlink fails with ENOTDIR. This saves a syscall for the common case of deleting a file.


            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: