Class FileHelper
-
- All Implemented Interfaces:
@Deprecated() public class FileHelper
-
-
Constructor Summary
Constructors Constructor Description FileHelper()
-
Method Summary
Modifier and Type Method Description static boolean
zipLogcatFile(String sourcePath, String destinationPath, String destinationFileName, String deviceId)
Create a Zip File containing the Logcat file. static void
writeFileInPrivateStorage(Context context, String fileName, String payload)
static void
writeFileInPrivateStorage(File file, String payload)
static boolean
deleteFile(Context context, String fileName)
static boolean
deleteFolder(File folder)
static String
readFileInPrivateStorage(File file)
static String
readFileInPrivateStorage(Context context, String filename)
-
-
Method Detail
-
zipLogcatFile
static boolean zipLogcatFile(String sourcePath, String destinationPath, String destinationFileName, String deviceId)
Create a Zip File containing the Logcat file.
- Parameters:
sourcePath
- Directory path of logcat file to zip.destinationPath
- Directory path where to store the compressed zip file.destinationFileName
- Filename with extension, but without directory path.deviceId
- A unique identifier for the device.- Returns:
true if compression was OK, false else.
-
writeFileInPrivateStorage
static void writeFileInPrivateStorage(Context context, String fileName, String payload)
-
writeFileInPrivateStorage
static void writeFileInPrivateStorage(File file, String payload)
-
deleteFile
static boolean deleteFile(Context context, String fileName)
-
deleteFolder
static boolean deleteFolder(File folder)
-
readFileInPrivateStorage
static String readFileInPrivateStorage(File file)
-
readFileInPrivateStorage
@Nullable() static String readFileInPrivateStorage(Context context, String filename)
-
-
-
-