How to use the fs-jetpack.inspectAsync function in fs-jetpack

To help you get started, we’ve selected a few fs-jetpack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beakerbrowser / beaker / app / bg / logger.js View on Github external
async function rotateLogFile (num) {
  try {
    var p = getLogPath(num)
    var info = await jetpack.inspectAsync(p)
    if (info && info.type === 'file') {
      await jetpack.moveAsync(p, getLogPath(num + 1))
    }
  } catch (err) {
    console.error('rotateLogFile failed', num, err)
  }
}
github beakerbrowser / beaker-core / logger.js View on Github external
async function retireLogFile (num) {
  try {
    var p = getLogPath(num)
    var info = await jetpack.inspectAsync(p)
    if (info && info.type === 'file') {
      await jetpack.removeAsync(p)
    }
  } catch (err) {
    console.error('retireLogFile failed', num, err)
  }
}
github beakerbrowser / beaker-core / logger.js View on Github external
async function rotateLogFile (num) {
  try {
    var p = getLogPath(num)
    var info = await jetpack.inspectAsync(p)
    if (info && info.type === 'file') {
      await jetpack.moveAsync(p, getLogPath(num + 1))
    }
  } catch (err) {
    console.error('rotateLogFile failed', num, err)
  }
}
github beakerbrowser / beaker / app / bg / logger.js View on Github external
async function retireLogFile (num) {
  try {
    var p = getLogPath(num)
    var info = await jetpack.inspectAsync(p)
    if (info && info.type === 'file') {
      await jetpack.removeAsync(p)
    }
  } catch (err) {
    console.error('retireLogFile failed', num, err)
  }
}