@testcomplete/filesystemutil
Version:
A file system interface to let scripts working with TestComplete & NodeJS at the same time
11 lines (9 loc) • 531 B
JavaScript
// Check for NodeJS. If NodeJS, require need relative path
let sPrePath = typeof process !== 'undefined' ? './' : '';
let fs = require(`${sPrePath}FileSystemUtil`);
function zInitializeTest () {
fs().write('./MyFileSource.txt', 'This is a text file - Source File');
fs().write('./MyFileTest.txt', 'This is a text file - Living File');
fs().write('./MyFileToDelete.txt', 'This is a text file - Will be delete');
fs().write('./MyFileToDeleteOnlyExists.txt', 'This is a text file - Will be delete if exists');
}