Package io.github.handsomecoder.utils
Class FileUtils
- java.lang.Object
-
- io.github.handsomecoder.utils.FileUtils
-
public class FileUtils extends Object
The type File utils.- Author:
- Harsh Shah
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcreateDirectory(String start, String... tails)Create directory int.static intcreateDirectory(Path path)Create directory int.static intcreateFile(String start, String... tails)Create file int.static intcreateFile(Path path)Create file int.static booleanisExists(Path path)Is exists boolean.static booleanisNotExists(Path path)Is not exists boolean.static List<String>read(String start, String... more)Read list.static intwrite(String line, String startLocation, String... location)Write int.static intwrite(List<String> lines, String startDirectory, String... location)Write int.
-
-
-
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 starttails- the tails- Returns:
- int int
-
createFile
public static int createFile(String start, String... tails)
Create file int.- Parameters:
start- the starttails- 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 startmore- the more- Returns:
- list list
-
write
public static int write(String line, String startLocation, String... location)
Write int.- Parameters:
line- the linestartLocation- the start locationlocation- the location- Returns:
- int int
-
-