Lines Matching refs:file
437 function defaultEval(code, context, file, cb) {
455 const hostDefinedOptionId = Symbol(`eval:${file}`);
493 file, // filename,
531 file, // filename,
1794 help: 'Save all evaluated commands in this REPL session to a file',
1795 action: function(file) {
1797 fs.writeFileSync(file, ArrayPrototypeJoin(this.lines, '\n'));
1798 this.output.write(`Session saved to: ${file}\n`);
1800 this.output.write(`Failed to save: ${file}\n`);
1807 help: 'Load JS from a file into the REPL session',
1808 action: function(file) {
1810 const stats = fs.statSync(file);
1813 const data = fs.readFileSync(file, 'utf8');
1819 `Failed to load: ${file} is not a valid file\n`,
1823 this.output.write(`Failed to load: ${file}\n`);