File -> file.removeFile not working for android version 8 and above

#1

I am trying to remove a file from the local storage of my phone device.
I have given the path and filename and both exist.

I ran checkDir & checkFile to confirm whether its getting the path and it returned true.

To remove file I am using -
this.file.removeFile(path, fileName)

I tried it on multiple android devices and observed that its only getting deleted for android versions below 8. I am not aware of any plugin update for the higher android version if there is any. I tried to google it but there is nowhere mentioned regarding plugin update.

Its throwing this error:
FileError {code: 6, message: “NO_MODIFICATION_ALLOWED_ERR”}
Although I have mentioned the permissions:
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE

I am not sure about what I am doing wrong here.
Thanks for the help.