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

java.io.File: Add copyTo, rmDir

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.6, 1.1.7, 1.3.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_nt

      Description



      Name: paC48320 Date: 06/22/98


      The java.io.File class could use some additional methods
      to make it more pratical for applications:

        - copyTo()
        - rmDir()

      I've read thru some of the bugs which have been submitted for these
      requests and they are all closed. These methods could be implemented
      by developers, but it is absolutely preposterous that these bugs have
      been closed suggesting that developers write these methods.

      Copying, deep copying, and deep removing *should* be included in
      File because they should be native calls into the operating system.
      The fact that the File API doesn't expose these basic operations
      seems like a bug to me.

      So please please aid those of developing real applications wit
       Java. It is impossible to write any application which uses the
      file system without using native methods, or implementing OS
      functions in Java.
      (Review ID: 33754)
      ======================================================================

      Name: krT82822 Date: 09/23/99


      Copy, move and delete are file operations that are provided by
      every class library I've ever seen. If a class library supports
      one of these operations it supports all three of them. Except
      Java.

      If you want to only provide two operations then make it copy and
      delete not move and delete. You can accomplish a move using a
      copy followed by a delete (albeit an inefficient move) but you
      can not accomplish a copy using any combination of move and
      delete.

      You support almost every other basic file operation as well as
      some not so basic operations, why not this one?
      (Review ID: 95648)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kkladkosunw Konstantin Kladko (Inactive)
                Reporter:
                pallenba Peter Allenbach (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: