 fs = require 'fs'
 
 Tile = require './Tile'
+config = require './config'
 
 # https://github.com/mapbox/node-mbtiles has native build dependencies (sqlite3)
 # To maximize mapscii's compatibility, MBTiles support must be manually added via

  null

module.exports = class TileSource
  config:
    persistDownloadedTiles: true

  cache: {}
  modes:
    MBTiles: 1

      @_createFolder userhome ".mapscii"
      @_createFolder userhome ".mapscii", "cache"
    catch error
      config.persistDownloadedTiles = false
      return

  _persistTile: (z, x, y, buffer) ->
