I need some help about the read method from File class. Basically I just want load a file, read the content and put the content in a new file.
Hereafter my code :
project_path = atom.project.getPaths();
let path2 = project_path + "\\template\\template.md" console.log(path2); const myFile2 = new File(path2); var text2 = myFile2.read(true); console.log(text2);
text2 is not a string with the file content but a promise, how can I get the file content please?
Thank you in advance for your answers!