import fse from 'fs-extra'
import path from 'path'

import {
  config
} from '../../'

export function exist(pathFile) {
  try{
    fse.statSync(pathFile)
    return true
  }catch(e){
    return false
  }

  return false
}

export function changePath(pathEnv, change) {
  pathEnv = pathEnv.replace(config.root, '').replace(/^\//, '').split('/')
  pathEnv[0] = change

  return path.join(config.root, pathEnv.join('/'))
}

@@ -414,8 +414,432 @@
 '/'))%0A%7D%0A
+%0A/**%0A * This method checks that the path leads to a file and return the content as UTF-8 content%0A * @param  %7Bstring%7D path The path%0A * @return %7Bstring%7D      The content of the UTF-8 file%0A */%0Aexport function getContent(pathFile) %7B%0A  var res = null%0A  if(typeof pathFile !== 'undefined' && pathFile !== null && pathFile !== '') %7B%0A    if (exist(pathFile)) %7B%0A      res = fse.readFileSync(pathFile, 'utf8')%0A    %7D%0A  %7D%0A  return res%0A%7D

fix a miserable error removing functions... which is mandatory