aboutsummaryrefslogtreecommitdiff
path: root/docker/netiquette/src/io/files.mjs
blob: c3eca1b40c2f7955b38c55153fdb14fba9d06d13 (plain) (blame)
1
2
3
4
5
6
7
8
'use strict'

import fs from 'fs'

export const readFile = (file, opts) => 
  new Promise((resolve, reject) =>
    fs.readFile(file, opts, (err, data) => 
      err ? reject(err) : resolve(data)))