Class FileUtils


  • public class FileUtils
    extends Object
    The type File utils.
    Author:
    Harsh Shah
    • Method Detail

      • createDirectory

        public static int createDirectory​(Path path)
        Create directory int.
        Parameters:
        path - the path
        Returns:
        int int
      • createDirectory

        public static int createDirectory​(String start,
                                          String... tails)
        Create directory int.
        Parameters:
        start - the start
        tails - the tails
        Returns:
        int int
      • createFile

        public static int createFile​(String start,
                                     String... tails)
        Create file int.
        Parameters:
        start - the start
        tails - the tails
        Returns:
        int int
      • createFile

        public static int createFile​(Path path)
        Create file int.
        Parameters:
        path - the path
        Returns:
        int int
      • isExists

        public static boolean isExists​(Path path)
        Is exists boolean.
        Parameters:
        path - the path
        Returns:
        boolean boolean
      • isNotExists

        public static boolean isNotExists​(Path path)
        Is not exists boolean.
        Parameters:
        path - the path
        Returns:
        boolean boolean
      • read

        public static List<String> read​(String start,
                                        String... more)
        Read list.
        Parameters:
        start - the start
        more - the more
        Returns:
        list list
      • write

        public static int write​(String line,
                                String startLocation,
                                String... location)
        Write int.
        Parameters:
        line - the line
        startLocation - the start location
        location - the location
        Returns:
        int int
      • write

        public static int write​(List<String> lines,
                                String startDirectory,
                                String... location)
        Write int.
        Parameters:
        lines - the lines
        startDirectory - the start directory
        location - the location
        Returns:
        int int