How to copy directory in Java

  • 21 January 2017
  • ADM

How to copy a directory and all sub-directories or files in Java. The recursive method used to traverse all the subdirectories.


How to display the content of a directory in Java

  • 20 January 2017
  • ADM

How to display the content of a directory in Java. Recursive method used to display all the sub-folders structure.


How to check if directory is empty in Java

  • 19 January 2017
  • ADM

How to check if a directory is empty in Java. Example using list() method of File class.


How to copy files in Java

  • 18 January 2017
  • ADM

How to copy files in Java with three examples: Classic method with streams, using FileChannel class and using Files class.


How to get the current working directory in Java

  • 17 January 2017
  • ADM

How to get the current working directory in Java using user.dir system parameter.


How to calculate date/time difference in Java

  • 16 January 2017
  • ADM

How to calculate the date and time difference in Java using a simple method of division and remainder of division.