VimUnDo(`8bDp ?< makeTree(path.basename(location), function onTree(error) {:____M&=_M5_M$https://github.com/Gozala/graphquire5_M 5_  #v#M $https://github.com/Gozala/graphquire5_ #v#M?5_ #v#M?5_#v#M 5_ "#v#Mt "exports.mktree = function mktree()5_ $#v#Mu%exports.mktree = function mktree() {}5_ !#v#M1 $exports.mktree = function mktree() {5_  #v#M7 var fs = require  5_  #v#M= var fs = require()5_   #v#M= var fs = require("")5_  #v#M> var fs = require("fs")5_  #v#MA   5_  #v#M  fs.5_  #v#M  fs.mkdir()5_  #v#M  fs.mkdir(path, )5_ % #v#M (exports.mktree = function mktree(path) {5_ #v#M  5_  #v#M var path = require()5_  #v#M var path = require("")5_  #v#M var path = require("path")5_  #v#M 5_  #v#M 5_  #v#M 2exports.mktree = function mktree(path, callback) {5_ " #v#M 4exports.makeTree = function mktree(path, callback) {5_  #v#M  fs.mkdir(path, callback)5_  #v#M$ ! fs.mkdir(path, onMakeDirectory)5_ " #v#M& # fs.mkdir(path, onMakeDirectory())5_  $ #v#M& & fs.mkdir(path, onMakeDirectory() {})5_! ! #v#M) $ fs.mkdir(path, onMakeDirectory() {5_ "! + #v#M 6exports.makeTree = function makeTree(path, callback) {5_!#" & #v#M ) fs.mkdir(path, onMakeDirectory(error) {5_"$# % #v#M   5_#%$ #v#M  if ()5_$(% #v#M  if (error)5_%)'( #v#M  if (error) mkdir()5_(*) #v#M  if (error) fs.mkdir()5_)+*' #v#M ' if (error) fs.mkdir(path.directory)5_*,+ #v#M  if (error) 5_+-,  #v#M   5_,/- #v#M% if (error) fs.mkdir()5_-0./ #v#M. if (error) {}5_/10 #v#M2 if (error)5_021 #v#M5 5_142 #v#M; parts.push()5_2534 #v#ML parts.push(path.basename())5_465 #v#MP# parts.push(path.basename(path))5_576 #v#MU5_687 #v#Md5_798  #v#Mg  var parts = []5_8:9 #v#Mj  if (!error)5_9;: #v#Mt& parts.unshift(path.basename(path))5_:<;  #v#Mv  if (!error) 5_;=< #v#My  if (error) 5_<>= #v#M{  if (!error) 5_=?> #v#M}  if (!error) callback5_>@? #v#M  if (!error) return callback5_?A@  #v#M ! if (!error) return callback()5_@BA  #v#M ) fs.mkdir(path, onMakeDirectory(error) {5_ACB #v#M 5_BDC  #v#M fs.mkdir()5_CED #v#M fs.mkdir()5_DFE  #v#M makeTree()5_EGF #v#M makeTree(path.dirname())5_FHG ) #v#M  fs.mkdir(location, onMakeDirectory.bind(lacation, callback))5_ced1%,v,M D fs.mkdir(location, onMakeDirectory.bind(null, lacation, callback))5_dfe %,v,M  else callback(null)5_egfD%,v,MD fs.mkdir(location, onMakeDirectory.bind(null, location, callback))5_fhg%,v,M fs.mkdir(location, function()5_gih!%,v,M" fs.mkdir(location, function() {}5_hji%,v,M! fs.mkdir(location, function() {5_ikj"%,v,MA 5_jlk%,v,MB if ()5_kml%,v,MH if (error.code === '')5_lnm%,v,MM if (error.code === 'EEXIST')5_mon%,v,MV) if (error || error.code === 'EEXIST')5_npo*%,v,MW* if (!error || error.code === 'EEXIST')5_oqp3%,v,M_ 5_prq%,v,Mf if ()5_qsr%,v,Mk if (!callback)5_rts%,v,Ml if (!callback) {}5_sut%,v,Mm mode =  5_tvu %,v,Mu  mode = ''5_uwv%,v,My 5_vxw%,v,M~ & fs.mkdir(location, function(error) {5_wyx4%,v,M5 if (!error || error.code === 'EEXIST') callback()5_xzy7%,v,M 5_y{z%,v,M else makeTree()5_z|{%,v,M! else makeTree(path.dirname())5_{}|(%,v,M) else makeTree(path.dirname(location))5_|~}*%,v,M+ else makeTree(path.dirname(location), )5_}~:%,v,M; else makeTree(path.dirname(location), mode, function())5_~<%,v,M> else makeTree(path.dirname(location), mode, function() {})5_%,v,M 5_%,v,M makeTree.bind()5_%,v,M< else makeTree(path.dirname(location), mode, function() {-makeTree.bind(null, location, mode, callback)3 makeTree.bind(null, location, mode, callback)5_]%,v,M] else makeTree(path.dirname(location), mode, makeTree.bind(null, location, mode, callback)5_%,v,M })5_ %,v,M 5function onMakeDirectory(location, callback, error) {? if (error.code === 'ENOENT') makeTree(path.dirname(location)) else if (errorcallback(null)5_  % ,v,M }5_0 % ,v,M^ else makeTree(path.dirname(location), mode, makeTree.bind(null, location, mode, callback))5_ % ,v,M*}5_ % ,v,M+ 5_  % ,v,M2 5_  % ,v,MU var path = require("path");5_ % ,v,MV var fs = require("fs");5_ vMh }5_ vM(exports.removeTree = function removeTree5_) vM*exports.removeTree = function removeTree()5_< vM vM?exports.removeTree = function removeTree(location, callback) {}5_ vMr 5_  vMy fs.rmdir()5_# vM, fs.mkdir(location, mode, function(error) {5_' vM4 fs.mkdir(location, mode, function on Make(error) {5_& vM' fs.rmdir(location, function onRemove)5_' vM) fs.rmdir(location, function onRemove())5_- vM. fs.rmdir(location, function onRemove(error))5_/ vM1 fs.rmdir(location, function onRemove(error) {})5_  vM 5_ vM if ()5_ vM if (error.code === '')5_# vM# if (error.code === 'ENOTEMPTY')5_# vM 5_ vM if ()5_" vM$ if (!error || error.code === '')5_* vM* if (!error || error.code === 'ENOENT')5_4 vM5 if (!error || error.code === 'ENOENT') callback()5_. vM 5_  vM // Directory does not exists5_ vM! // Directory does not exists.5_ vM5 // If delete succeeded Directory does not exists.5_ vM8 // If delete succeeded or Directory does not exists.5_, vM8 // If delete succeeded or directory does not exists.5_6 vM7 // If delete succeeded or directory did not exists.5_5 vM6 // If delete succeeded or directory did not exist.5_8 vM8 // If delete succeeded or directory did not existed.5_8 vM  5_; vMC! //  5_ vME! if ()5_ vMI! if (error.code)5_ vMR! if (error.code === ''5_  vMV! if (error.code === 'ENOTDIR'5_, vM^!- if (error.code === 'ENOTDIR') fs.unlink()5_;vMg!< // If directory is not empty we should delete each entry5_;vMh "  !5_;vMj "> // If directory is not empty we should delete each entry5_;vMn" 5_ $;vM!"$ if (error.code === 'ENOTEMPTY') 5_ 8;vM!"9 if (error.code === 'ENOTEMPTY') removeChildren.bind()5_ 9;vM!"9 if (error.code === 'ENOTEMPTY') removeChildren.bind()5_ 3;vM!"4 if (error.code === 'ENOTEMPTY') removeChildren()5_ M;vM!"O if (error.code === 'ENOTEMPTY') removeChildren(location, removeTree.bind())5_ U;vM!"W if (error.code === 'ENOTEMPTY') removeChildren(location, removeTree.bind(null, lo))5_ $;vM""g if (error.code === 'ENOTEMPTY') removeChildren(location, removeTree.bind(null, location, callback))5_!;vM!##5_;vM$? if (error.code === 'ENOTDIR') fs.unlink(location, callback)5_ ;vM!$# if (error.code === 'ENOTEMPTY')5_!;vM!#% !#$5_;vM&%5_;vM&function removeChildren()5_;vM&function removeChildren() {}5_;vM'function removeChildren() {5_ ;vM'#function removeChildren(location) {5_;vM'5_ ; vM) (5_ !;!vM) fs.readdir()5_!;!vM#) fs.readdir(location, onList)5_&!;!vM&)' fs.readdir(location, function onList)5_'!;!vM')) fs.readdir(location, function onList())5_%!;!vM9$&)I removeChildren(location, removeTree.bind(null, location, callback))5_%*!;!vM@$&)V removeChildren(path.dirname(location, removeTree.bind(null, location, callback))5_!;!vMG)-function removeChildren(location, callback) {5_!;!vMM)+function removeEnries(location, callback) {5_%%%vMS$&)W removeChildren(path.dirname(location), removeTree.bind(null, location, callback))5_6%%vM[)7 fs.readdir(location, function onList(error, entries))5_8%%vM[): fs.readdir(location, function onList(error, entries) {})5_&&vMe+,function removeEntries(location, callback) {+ *5_+&&vMl+ *5_''vMn+ if ()5_''vMp+ if (error)5_''vMu+ if (error) return callback()5_#''vM{, +5_((vM, function next()5_((vM, function next() {}5_((vM, function next() {}5_))vM- function next() {5_))vM. -5_ **vM. if ()5_**vM. if (error)5_**vM. if (error)5_!**vM." if (error) return callback()5_%**vM/ .5_++vM 0  /5_ ,,vM 0 if ()5_ ,,vM 0 if (entries.length)5_,,vM 0 if (0 === entries.length)5_),,vM 0* if (0 === entries.length) callback()5_ ,,vM "1  "05_!--vM "1 entries.forEach()5_!$--vM "1& entries.forEach(removeTree.bind())5_ --vM "2  "15_!!..vM  "2" var remove = removeTree.bind()5_!..vM  !( var remove = removeTree.bind(null, )5_!+--vM  "1, entries.forEach(removeTree.bind(null, ))5_ --vM 4 "2  "15_ ..vM 9 "3  "25_//vM N entries.shift()5_ ..vM Q!2 var l = 05_   vM W!2 var process = 05_  vM [3 25_!!vM ]3 var process = 05_!!vM c!35_""vM g 4. if (0 === entries.length) callback(null)5_ ""vM m 5_!!vM p3 var progress = 05_!!vM t  3* if (0 === --progress) callback(null)5_" !!vM !#3 while()5_"!!vM !#3# while(++steps < entries.length)5_"!!vM !#3 while(entries.length)5_"!!!vM "$4 "$35_#!!vM "$4 exports.removeTree()5_##!!vM "$4% exports.removeTree(path.join())5_#5!!vM "$48 exports.removeTree(path.join(location, entries[]))5_#<!!vM "$4= exports.removeTree(path.join(location, entries[steps]))5_$!!vM !#$' entries.forEach(removeTree, null, )5_"!!vM !#3# while(entries.length > steps++)5_"$!!vM !#3% while(entries.length > ++steps++)5_ !!vM 3 var steps = 05_  !!vM "3 var steps = -5_   !!vM 3 var steps = -15_   ""!!vM!!#3# while(entries.length > ++steps)5_   "!!vM!4 35_  ""vM!4 if ()5_ ""vM!4 if (steps)5_""vM!4 if (!steps)5_ ""vM!"#4! if (!steps) return callback()5_# ""vM!?"$4 while(--steps)5_#""vM!E"$4 while(0 >= --steps)5_#""vM!H$"$4 while(--steps)5_ ""vM!W!4' if (0 === --steps) callback(null)5_ $""vM!]!44 if (entries.length === --steps) callback(null)5_ ""vM!a!4( if (entries.length) callback(null)5_ ""vM!g!4- if (stepsentries.length) callback(null)5_ ""vM!l%!4/ if (++stepsentries.length) callback(null)5_ ""vM!~&!42 if (++steps < entries.length) callback(null)5_1 ""vM!024 else 5_1""vM!'024 else callback()5_2""vM!(125_0!""vM!/13V removeEntries(path.dirname(location), removeTree.bind(null, location, callback))5_0""vM!)/13I removeEntries(location), removeTree.bind(null, location, callback))5_  ""vM#!34 if (++steps === entries.length) callback(null)5_! ""vM# !32 if (steps === entries.length) callback(null)5_ "! ""vM# *!3( if (entries.length) callback(null)5_!#"(!""vM#(*4 (*35_"$#)""vM#() console5_#%$""vM# 4  35_$&%##vM# 4 console.log()5_%'&##vM#+ 4 console.log('')5_&('##vM# 4 console.log('<<<')5_')("##vM#, 4$ console.log('<<<' + entries[])5_(*)(##vM#- 4) console.log('<<<' + entries[steps])5_)+**##vM#. 49 console.log('<<<' + entries[steps], entries.length)5_*,+##vM$@ console.log('<<<' + entries[steps], steps, entries.length)5_+-, ""vM$!34 if (entries.length === steps++) callback(null)5_,.- &""vM$/!36 if (entries.length === ++steps++) callback(null)5_-/.""vM$%% if (!steps) return callback(null)5_.0/#!!vM$'2$& next#&3 #%25_/10!!!vM$3 "4 5_021#!!vM$4!#4 while(--steps >= 0)5removeTree(path.join(location, entries[steps]), next)"$4C exports.removeTree(path.join(location, entries[steps]), next)5_132(((vM$')3>exports.removeTree = function removeTree(location, callback) {5_243(((vM$')3, = function removeTree(location, callback) {5_354(((vM$')3* function removeTree(location, callback) {5_4653((vM$5335_576  vM$ 4@exports.makeTree = function makeTree(location, mode, callback) {5_687  vM$ 40 = function makeTree(location, mode, callback) {5_798  vM$ 4. function makeTree(location, mode, callback) {5_8:9 vM$6545_9;:5 vM$68function writeFile555_:<;7 vM$6function writeFile()5_;=<7. vM$68.function writeFile(location, source, callback)5_<>=70 vM$61function writeFile(location, source, callback) {}5_=?>7 vM$799 7985_>@?7 vM$7995_?A@8 vM$79:5_@BA: vM$::5_ACB8 vM%79; 5_BDC8  vM%79; makeTree()5_CED8  vM%79; makeTree(location)5_DFE8" vM%79;" makeTree(path.basename(location)5_EHF  vM%7< ;5_FIGH(vM%<9 if (!error || error.code === 'EEXIST') callback(null)5_HJI(vM%<" if (!error || ) callback(null)5_IKJ (vM%= <5_JLK(vM%= if ()5_KML (vM%= if (error.code === 'EEXIST')5_LNM(vM%=! if (error.code === 'EEXIST') 5_MON&(vM%=& else if (error.code === 'EEXIST') 5_NPO/(vM%=0 else if (error.code === 'EEXIST') callback()5_OQPHvHM%=I // TODO: Call callback with error if it's a file and not a directory.5_PRQHvHM% 5_QSRHvHM%= <5_RTSHvHM%8=K // TODO: Call callback with error if it's a file and not a directory.5_SUT:"HvHM&9;=# makeTree(path.basename(location))5_TVU:4HvHM&9;=6 makeTree(path.basename(location), function onTree())5_UWV::HvHM&9;=; makeTree(path.basename(location), function onTree(error))5_VXW:<HvHM&9<=> makeTree(path.basename(location), function onTree(error) {})5_WYX:HvHM&":<? :<>5_XZY;HvHM&$:<? if ()5_Y[Z;HvHM&%:<? if (error)5_Z\[;HvHM&':<? if (error) callback()5_[]\;HvHM&*;=@ ;=?5_\^]<HvHM&2;=@ else fs.writeFile()5_]_^>HvHM&7;=> fs.writeFile()5_^_:HvHM&=9;?< makeTree(path.basename(location), function onTree(error) {5_FHG) vM%<4 if (!error || error.code === 'Ω) callback(null)5_  vMc , fs.mkdir(location, mode, function(error) {5_HJI % ,v,M$ makeTree(location.dirname(path))5_243 #v#MI parts.push(path.())5_-/. #v#M' if (error) { }5_%&(' #v#M( Q if (error) mkdir(node_modules/https!github.com/Gozala/models/raw/master/lib/)5_%'&  #v#M  if (error.g) mkdir()5