async function convertToBase64(filePath, vol = fs) {
  if (typeof filePath !== 'string') throw new Error('Token filePath name must be a string');
  // typecast to Buffer because we know that without specifying encoding, this returns a Buffer
  // @ts-expect-error requires encoding options, this is a mistake in memfs types definition
  const body = /** @type {Buffer} */ (vol.readFileSync(resolve(filePath, vol.__custom_fs__)));
  return toBase64(body);
}
@typedef {import('../../types/Volume.d.ts').Volume} Volume
Takes a file and converts it to a base64 string.
@private
@param {string} filePath - Path to the file you want base64'd
@param {Volume} [vol]
@returns {Promise<string>}