本文整理匯總了TypeScript中rimraf.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: before
before(async () => {
driver = await createDriver();
driver.defaultWaitTime = 15000;
let dir = "mochawesome-report";
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
rimraf('mochawesome-report/*', function () { });
});
示例2: before
before(async function () {
this.timeout(QUEUE_WAIT_TIME);
driver = await createDriver();
driver.defaultWaitTime = 15000;
let dir = "mochawesome-report";
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
rimraf('mochawesome-report/*', function () { });
});
示例3: Promise
return new Promise(resolve => {
if (fs.existsSync(path)) {
rimraf(path, resolve);
} else {
resolve(true);
}
});
示例4: webpack
webpack(webpackConfig, function () {
rimraf(outFolder, fs, () => {
if (isCalled) {
done();
}
isCalled = true;
});
});
示例5: Promise
return new Promise((res, rej) => {
rimraf(directory, (err) => {
if (err) {
rej(err);
}
res();
});
});
示例6: rimraf
deletePath: (path, callback) => {
rimraf(path, {
disableFlob: true
}, (err) => {
if (err) return callback(err);
callback(null);
})
},
示例7: Promise
return new Promise((resolve, reject) => {
rmdir(destination, function (error) {
if (error) {
console.log("Error in uninstalling Extension.");
console.log(error);
reject(false);
}
resolve(true);
});
});
示例8: Promise
return new Promise((resolve, reject) => {
rmrf(this.getCraneDir() + '/projects/*', err => {
if (!err) {
Debug.info('Project caches were deleted');
return resolve(true);
}
Debug.info('Project caches were not deleted');
return resolve(false);
});
});
示例9: rmdir
[function(stat, cb){
if(!stat.isSymbolicLink()){
rmdir(to, function(err){
cb(err,true);
});
} else {
fs.unlink(to, function(err){
cb(err,true);
});
}
}, chain.last]
示例10: Promise
return new Promise(resolve => {
if (!fs.existsSync(p)) {
rimraf(p, error => {
Git.Clone.clone(url, p, opts).then(repo => {
resolve(repo);
});
});
} else {
resolve();
}
});