Package backtraceio.library.common
Class FileHelper
- java.lang.Object
-
- backtraceio.library.common.FileHelper
-
public class FileHelper extends java.lang.ObjectHelper class for access to files
-
-
Constructor Summary
Constructors Constructor Description FileHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.ArrayList<java.lang.String>filterOutFiles(android.content.Context context, java.util.List<java.lang.String> paths)Remove from path list invalid paths like empty or incorrect paths or not existing filesstatic java.lang.StringgetFileExtension(java.io.File file)Get file extensionstatic booleanisFileExists(java.lang.String absoluteFilePath)Check does file existstatic java.lang.StringreadFile(java.io.File file)
-
-
-
Method Detail
-
filterOutFiles
public static java.util.ArrayList<java.lang.String> filterOutFiles(android.content.Context context, java.util.List<java.lang.String> paths)Remove from path list invalid paths like empty or incorrect paths or not existing files- Parameters:
context- application contextpaths- list of paths to files- Returns:
- filtered list of file paths
-
getFileExtension
public static java.lang.String getFileExtension(java.io.File file)
Get file extension- Parameters:
file- file whose extension will be returned- Returns:
- file extension
-
isFileExists
public static boolean isFileExists(java.lang.String absoluteFilePath)
Check does file exist- Parameters:
absoluteFilePath- absolute path to the file to be checked- Returns:
- true if file exists
-
readFile
public static java.lang.String readFile(java.io.File file)
-
-