xxxxxxxxxx
// creating the file and the path
val directory:File =
currentActivity.applicationContext.getExternalFilesDir(Environment.DIRECTORY_MOVIES)!!
val filePathString= directory.path.plus("videoName.mp4")
val file = File(filePathString)
if (file.exists()) {
file.delete()
}
file.createNewFile()