tasks/download.js
function (url, content) {
            var dirName = path.dirname(url);

            if (!fs.existsSync(dirName)) {
                fs.mkdirSync(dirName);
            }

            fs.writeFileSync(url, content, {
                mode: 0777
            });
        }
function (url, content) {
            var dirName = path.dirname(url);

            if (!fs.existsSync(dirName)) {
                fs.mkdirSync(dirName);
            }

            fs.writeFileSync(url, content, {
                mode: 0777
            });
        }
function ( url , content ) { var dirName = path . dirname ( url ) ; if ( ! fs . existsSync ( dirName ) ) { fs . mkdirSync ( dirName ) ; } fs . writeFileSync ( url , content , { mode : 0777 } ) ; }
Writes data to a file, ensuring that the containing directory exists.
Writes data to a file ensuring that the containing directory exists .