Interface Files


  • public interface Files
    Some additional methods for the java.nio.file.Files class.
    • Method Detail

      • createDirectory

        static void createDirectory​(Path directory)
      • ensureAbsence

        static void ensureAbsence​(Path path)
      • is_file

        static boolean is_file​(Path path)
      • walkDirectChildren

        static Stream<Path> walkDirectChildren​(Path path)
      • walk_recursively

        static Stream<Path> walk_recursively​(Path path)
      • isDirectory

        static boolean isDirectory​(Path path)
      • deleteDirectory

        static void deleteDirectory​(Path dirToDelete)
        IDEA Create method to move path to trash instead of deleting it.
      • copyDirectory

        static void copyDirectory​(Path sourceDirectory,
                                  Path targetDirectory)
      • writeToFile

        static void writeToFile​(Path path,
                                Node node)
      • writeToFile

        static void writeToFile​(Path path,
                                byte[] content)
      • newLine

        static String newLine()
        TODO How do we handle new line symbols on all platforms?
        Returns:
        New Line Symbol
      • appendToFile

        static void appendToFile​(Path path,
                                 byte[] content)
      • readFileAsString

        static String readFileAsString​(Path path)
      • readFileAsBytes

        static byte[] readFileAsBytes​(Path path)
      • fileExists

        static boolean fileExists​(Path path)