nl_tokens: sync version of existsOrCreate
pl_tokens: function existsOrCreateSync ( filePath , opts ) { opts = opts || { } ; opts . encoding = opts . encoding || 'utf8' ; opts . data = opts . data || opts . content || '' ; opts . mode = opts . mode || '0777' ; var fp = resolve ( filePath ) ; var isFile = opts . hasOwnProperty ( 'isFile' ) ? opts . isFile : ! ! fp . extName ; var exists = fs . existsSync ( fp . fullPath ) ; if ( ! exists || opts . replace ) { mkdir ( ( isFile ? fp . dirName : fp . fullPath ) ) ; if ( isFile || opts . replace ) <mask> . writeFileSync ( fp . fullPath , opts . data , opts . encoding ) ; } function mkdir ( fullPath ) { if ( fs . existsSync ( fullPath ) ) return ; else { var parentPath = fullPath . split ( '/' ) ; parentPath . pop ( ) ; mkdir ( parentPath . join ( '/' ) ) ; fs . mkdirSync ( fullPath , opts . mode ) ; } } return exists ; }