@capacitor/filesystem replace the same file

I have used @capacitor/filesystem plugin for saved some base64 files which is got from gallery( @capacitor/camera) first issue was i couldn’t get original file name. are there any solution?
second issue was the when using appendFile(...) or writeFile(...) replace files that has same file name,will it be correct as filename(1).