Files
med-notes/.pnpm-store/v10/files/8a/9e281eacaf7b1fd664bd2c477e2151ff3a540f513a4fa69e9796c4f2d2d544644b85169e192610696107a17a764167b05b181dadc013b1ddefef85ba30c4a2
2025-05-09 05:30:08 +02:00

42 lines
717 B
Plaintext

// Copyright 2017 Lovell Fuller and others.
// SPDX-License-Identifier: Apache-2.0
'use strict';
const fs = require('fs');
/**
* The path where we can find the ldd
*/
const LDD_PATH = '/usr/bin/ldd';
/**
* Read the content of a file synchronous
*
* @param {string} path
* @returns {string}
*/
const readFileSync = (path) => fs.readFileSync(path, 'utf-8');
/**
* Read the content of a file
*
* @param {string} path
* @returns {Promise<string>}
*/
const readFile = (path) => new Promise((resolve, reject) => {
fs.readFile(path, 'utf-8', (err, data) => {
if (err) {
reject(err);
} else {
resolve(data);
}
});
});
module.exports = {
LDD_PATH,
readFileSync,
readFile
};