balena-cli/lib/data/data-prefix.coffee
2014-11-07 12:42:02 -04:00

16 lines
249 B
CoffeeScript

fsUtils = require('../fs-utils/fs-utils')
prefix = null
exports.get = ->
return prefix
exports.set = (newPrefix) ->
if not fsUtils.isValidPath(newPrefix)
throw new Error('Invalid path')
prefix = newPrefix
exports.clear = ->
prefix = null