public class FileTool
extends java.lang.Object
| Constructor and Description |
|---|
FileTool() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
moveFileWithRenaming(java.lang.String pathFrom,
java.lang.String pathTo)
Gets contents of one file and calls {
writeFileContentsWithRenaming(String, byte[])} to write it on new filepath. |
static java.lang.String |
writeFileContentsWithRenaming(java.lang.String path,
byte[] contents)
Wtires byte[] contents to specified file.
|
public static java.lang.String writeFileContentsWithRenaming(java.lang.String path,
byte[] contents)
path - full file path to write tocontents - byte[]public static java.lang.String moveFileWithRenaming(java.lang.String pathFrom,
java.lang.String pathTo)
writeFileContentsWithRenaming(String, byte[])} to write it on new filepath.
If writes done successfully - remove source file.pathFrom - full file path to get contentspathTo - full file path to write to