DataBridge Documentation 2.0.17
A Java library for managing database connections and transactions
|
Static Public Member Functions | |
static List< String > | getAbsoluteFilePaths (String directoryPath) throws IOException |
static List< String > | readFile (String filePath) |
static void | writeFile (String filePath, List< String > content) throws IOException |
static void | writeFile (String filePath, String content) throws IOException |
Utility class for working with file and directory operations. Provides methods to read, write, and retrieve file paths from a directory.
This class offers static methods for accessing and manipulating files and directories in a Java application, including functionality to read files line-by-line, write content to files, and retrieve absolute paths of files in a specified directory.
|
static |
Retrieves a list of absolute file paths from a specified directory. Only regular files are included in the list; subdirectories are skipped.
directoryPath | The path of the directory from which to retrieve files. |
IOException | If the directory path does not exist or is not a directory. |
|
static |
Reads the content of a file and returns the lines as a list of strings.
filePath | The path of the file to read. |
null
if an error occurs.
|
static |
Writes a list of strings to a file, each string representing one line of content.
filePath | The path of the file to write to. |
content | A list of strings to be written to the file. |
IOException | If an error occurs while writing the file. |
|
static |
Writes a single string of content to a file.
filePath | The path of the file to write to. |
content | The string content to be written to the file. |
IOException | If an error occurs while writing the file. |