I want to delete all files that there file names start with the same string in a certain directory, for example I have the following directory:
public/
[email protected]
[email protected]
[email protected]
[email protected]
so I would like to apply a function to delete all the files that start with the string profile-photo
to have at the end the following directory:
public/
[email protected]
I am looking for function like this:
fs.unlink(path, prefix , (err) => {
});