@testcomplete/filesystemutil
Version:
A file system interface to let scripts working with TestComplete & NodeJS at the same time
10 lines (7 loc) • 347 B
JavaScript
// Check for NodeJS. If NodeJS, require need relative path
let sPrePath = typeof process !== 'undefined' ? './' : '';
let fs = require(`${sPrePath}FileSystemUtil`);
function cDeleteFile () {
Log.message('Reading Local file "./MyFileToDelete.txt" : ' + fs().read('./MyFileToDelete.txt'));
fs().delete('./MyFileToDelete.txt');
}