Create New File on Disk - File API


#1

Any example on using https://atom.io/docs/api/v1.31.2/File API, I want to create a copy of current document on disk


#2
// Somewhere in your header
const { File } = require('atom');

// Create file
const myFile = new File('path/to/file'));
myFile.create();

#4

Thanks a lot, You save my life :slight_smile: , could you please answer question here as well , may be :slight_smile: