I'm new to JS,can anyone tell me how to check if the file exists in the mentioned path in js ? In the back end i am using ROR .
Ex: In the UI I enter a path where a particular file need to be exported . Before the export function takes place a check needs to be done.
Export function should not take place if the file already exists and an alert message should be displayed to the user .
Thanks.