Files

Java Files - 13 Cards
Click here to toggle all cards
Path Class
Represents file or directory path
Paths.get()
Method to create a Path object
Predicate
Functional interface returning boolean with one argument
BiPredicate
Functional interface returning boolean with two arguments
Files Class
Provides utility methods for file and directory operations
Files.createDirectory()
Creates a new directory
Files.delete()
Deletes a file or directory
Files.copy()
Copies a file or directory from one location to another
Files.move()
Moves a file or directory from one location to another
Files.exists()
Checks if a file or directory exists
Files.find()
Recursively searches for files and directories
Files.lines()
Reads file as a Stream of lines
Files.write()
Writes bytes to a file in Java