Package net.splitcells.dem.resource
Interface Files
-
public interface Files
Some additional methods for the java.nio.file.Files class.
-
-
Method Summary
All Methods Static Methods Deprecated Methods Modifier and Type Method Description static void
appendToFile(Path path, byte[] content)
static void
copyDirectory(Path sourceDirectory, Path targetDirectory)
static void
createDirectory(Path directory)
static void
deleteDirectory(Path dirToDelete)
IDEA Create method to move path to trash instead of deleting it.static void
ensureAbsence(Path path)
static boolean
fileExists(Path path)
static boolean
is_file(Path path)
static boolean
isDirectory(Path path)
static InputStream
newInputStream(Path path)
static String
newLine()
TODO How do we handle new line symbols on all platforms?static byte[]
readFileAsBytes(Path path)
static String
readFileAsString(Path path)
static Stream<Path>
walk_recursively(Path path)
static Stream<Path>
walkDirectChildren(Path path)
static void
writeToFile(Path path, byte[] content)
static void
writeToFile(Path path, String string)
Deprecated.static void
writeToFile(Path path, Node node)
-
-
-
Method Detail
-
createDirectory
static void createDirectory(Path directory)
-
ensureAbsence
static void ensureAbsence(Path path)
-
is_file
static boolean is_file(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.
-
writeToFile
static void writeToFile(Path path, byte[] content)
-
writeToFile
@Deprecated static void writeToFile(Path path, String string)
Deprecated.
-
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)
-
readFileAsBytes
static byte[] readFileAsBytes(Path path)
-
newInputStream
static InputStream newInputStream(Path path)
-
fileExists
static boolean fileExists(Path path)
-
-