// here frit i want to save a mp4 file before saving i want to check is it alreday there.if there than create another name
let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
let savePathUrl = NSURL(string: ("\(documentsURL.appendingPathComponent("temp"))" + ".mp4"))
if FileManager.default.fileExists(atPath: **savePathUrl**)// here i get error
}
{
do
{
try FileManager.default.removeItem(atPath: **savePathUrl**)// here i get error
}
catch { }
}