Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-595

Add similar util class as FileUtils for java.nio.file.Path

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7
    • Utilities
    • None

    Description

      There are several utility methods in FileUtils that are not present in the Java 7 Files API for Path. These would make up a useful basis for a PathUtils class to complement Java's java.nio.file package. Below is a listing of method ideas adapted from FileUtils for Path that are not already covered by java.nio.file.Files or trivially adapted to something there.

      • touch(Path)
      • contentEquals(Path, Path)
      • copyDirectoryToDirectory(Path, Path, CopyOption...)
      • copyDirectory(Path, Path, CopyOption...)
      • copyDirectory(Path, Path, PathMatcher, CopyOption...)
      • deleteDirectory(Path)
      • deleteQuietly(Path)
      • directoryContains(Path, Path)
      • cleanDirectory(Path)
      • waitFor(Path, long, TimeUnit)
      • forceDelete(Path)
      • forceDeleteOnExit(Path)
      • forceMkdir(Path)
      • forceMkdirParent(Path)
      • sizeOfDirectory(Path) - probably just return BigInteger only

      Attachments

        Activity

          People

            Unassigned Unassigned
            mattsicker Matt Sicker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: