Prompt Details
Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
177 ($0.00040 / call)
Example input
Delete all files in node.js?
(The entry is modified)
Example output
var fs = require('fs'),
_ = require('underscore');
removeDirForce("/some/path/");
// path should have trailing slash
function removeDirForce(path) {
fs.readdir(path, function(err, files) {
if (err) {
console.log(err.toString());
}
else {
if (files.length == 0) {
fs.rmdir(path, function(err) {
if (err) {
console.log(err.toString());
}
});
}
else {
_.each(files, function(file) {
var filePath = path + file + "/";
fs.stat(filePath, function(err, stats) {
if (stats.isFile()) {
fs.unlink(filePath, function(err) {
if (err) {
console.log(err.toString());
}
});
}
if (stats.isDirectory()) {
removeDirForce(filePath);
}
});
});
}
}
});
}
By purchasing this prompt, you agree to our terms of service
GPT-3.5-TURBO
β Do you want to use BlackBox AI correctly?
π"Available in over 20 programming languages"π
(Efficient with "Node.js".)
π€© After your purchase, you will know how to best write your question to get the best possible answer.
Chat GPT, will provide you with the information that will save you time and energy. (This is very useful)
β
Our Prompt will bring your most ambitious ideas to life.
π Don't let the complexity of code slow you down anymore!
π² For only 3,99 euros, take advantage of it.
...more
Added over 1 month ago

