Package backtraceio.library.common
Class FileHelper
java.lang.Object
backtraceio.library.common.FileHelper
Helper class for access to files
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterOutFiles
(android.content.Context context, List<String> paths) Remove from path list invalid paths like empty or incorrect paths or not existing filesstatic String
getFileExtension
(File file) Get file extensionstatic boolean
isFileExists
(String absoluteFilePath) Check does file existstatic String
-
Constructor Details
-
FileHelper
public FileHelper()
-
-
Method Details
-
filterOutFiles
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
Get file extension- Parameters:
file
- file whose extension will be returned- Returns:
- file extension
-
isFileExists
Check does file exist- Parameters:
absoluteFilePath
- absolute path to the file to be checked- Returns:
- true if file exists
-
readFile
-