Skip to content

Instantly share code, notes, and snippets.

@edinsoncs
Created September 13, 2016 05:18
Show Gist options
  • Save edinsoncs/d841c97b30a4d80a6f7b3d4e9a7491ff to your computer and use it in GitHub Desktop.
Save edinsoncs/d841c97b30a4d80a6f7b3d4e9a7491ff to your computer and use it in GitHub Desktop.
var fs = require('fs');
fs.link('hola.txt', 'v/demosito.txt', function(success){
if(success !== success){
return new err;
} else {
console.log('se movio a la carpeta')
}
});
fs.mkdir('newfolder', function(sucess){
if(sucess){
var sync = fs.linkSync('hola.txt', 'newfolder/nuevofile.txt');
console.log('se creo el folder y el archivo');
}
});
/*
setInterval(function(){
var name = Math.random() + 'folder';
fs.mkdir(name, function(){
console.log('creado folder: ' + name);
});
}, 1000); */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment