HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/nodejs/fast-glob/out/tests/utils/entry.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.builder = void 0;
const path = require("path");
const fs_macchiato_1 = require("@nodelib/fs.macchiato");
class EntryBuilder {
    constructor() {
        this._isFile = true;
        this._isDirectory = false;
        this._isSymbolicLink = false;
        this._entry = {
            name: '',
            path: '',
            dirent: new fs_macchiato_1.Dirent()
        };
    }
    path(filepath) {
        this._entry.name = path.basename(filepath);
        this._entry.path = filepath;
        return this;
    }
    file() {
        this._isFile = true;
        this._isDirectory = false;
        return this;
    }
    directory() {
        this._isDirectory = true;
        this._isFile = false;
        return this;
    }
    symlink() {
        this._isSymbolicLink = true;
        return this;
    }
    stats() {
        this._entry.stats = new fs_macchiato_1.Stats();
        return this;
    }
    build() {
        this._entry.dirent = new fs_macchiato_1.Dirent({
            name: this._entry.name,
            isFile: this._isFile,
            isDirectory: this._isDirectory,
            isSymbolicLink: this._isSymbolicLink
        });
        return this._entry;
    }
}
function builder() {
    return new EntryBuilder();
}
exports.builder = builder;