Class MoreFiles


  • public class MoreFiles
    extends java.lang.Object
    Methods that java.nio.Files should include.
    Author:
    jjlauer
    • Constructor Summary

      Constructors 
      Constructor Description
      MoreFiles()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void deleteDirectory​(java.nio.file.Path dir)
      Deletes a directory (and all the files in it).
      static boolean deleteDirectoryIfExists​(java.nio.file.Path dir)
      Deletes a directory if it exists (and all the files in it).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MoreFiles

        public MoreFiles()
    • Method Detail

      • deleteDirectory

        public static void deleteDirectory​(java.nio.file.Path dir)
                                    throws java.io.IOException
        Deletes a directory (and all the files in it).
        Parameters:
        dir - the directory to delete
        Throws:
        java.io.IOException
      • deleteDirectoryIfExists

        public static boolean deleteDirectoryIfExists​(java.nio.file.Path dir)
                                               throws java.io.IOException
        Deletes a directory if it exists (and all the files in it).
        Parameters:
        dir - the directory to delete
        Returns:
        True if deleted or false if it the dir did not exist
        Throws:
        java.io.IOException