lib/FileOutputStream.js
function(){
            // file mode defined ?
            if (mode){
                // set mode of destination file
                _fs.chmod(destinationFilename, mode, function(err){
                    if (err){
                        reject(err);
                    }else{
                        resolve();
                    }
                });
            }else{
                // finish
                resolve();
            }
        }
function(){
            // file mode defined ?
            if (mode){
                // set mode of destination file
                _fs.chmod(destinationFilename, mode, function(err){
                    if (err){
                        reject(err);
                    }else{
                        resolve();
                    }
                });
            }else{
                // finish
                resolve();
            }
        }
function ( ) { // file mode defined ? if ( mode ) { // set mode of destination file _fs . chmod ( destinationFilename , mode , function ( err ) { if ( err ) { reject ( err ) ; } else { resolve ( ) ; } } ) ; } else { // finish resolve ( ) ; } }
on complete - chmod
on complete - chmod