import { __exports as reader } from '../../../../../../../_virtual/reader.mjs';
import path__default from 'node:path';
import '../../../../../@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.mjs';
import '../utils/index.mjs';
import { __exports as out } from '../../../../../../../_virtual/index5.mjs';
import { __exports as utils$1 } from '../../../../../../../_virtual/index.mjs';

Object.defineProperty(reader, "__esModule", {
  value: true
});
const path = path__default;
const fsStat = out;
const utils = utils$1;
class Reader {
  constructor(_settings) {
    this._settings = _settings;
    this._fsStatSettings = new fsStat.Settings({
      followSymbolicLink: this._settings.followSymbolicLinks,
      fs: this._settings.fs,
      throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
    });
  }
  _getFullEntryPath(filepath) {
    return path.resolve(this._settings.cwd, filepath);
  }
  _makeEntry(stats, pattern) {
    const entry = {
      name: pattern,
      path: pattern,
      dirent: utils.fs.createDirentFromStats(pattern, stats)
    };
    if (this._settings.stats) {
      entry.stats = stats;
    }
    return entry;
  }
  _isFatalError(error) {
    return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
  }
}
reader.default = Reader;
