Uname:Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64

Base Dir : /var/www/machinox.in

User : root


403WebShell
403Webshell
Server IP : 13.235.167.51  /  Your IP : 216.73.217.116
Web Server : Apache
System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64
User : root ( 0)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/control.machinox.in/node_modules/next/dist/esm/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/control.machinox.in/node_modules/next/dist/esm/lib/recursive-copy.js
import path from 'path';
import { promises, constants } from 'fs';
import { Sema } from 'next/dist/compiled/async-sema';
import isError from './is-error';
const COPYFILE_EXCL = constants.COPYFILE_EXCL;
export async function recursiveCopy(source, dest, { concurrency = 32, overwrite = false, filter = ()=>true } = {}) {
    const cwdPath = process.cwd();
    const from = path.resolve(cwdPath, source);
    const to = path.resolve(cwdPath, dest);
    const sema = new Sema(concurrency);
    // deep copy the file/directory
    async function _copy(item, lstats) {
        const target = item.replace(from, to);
        await sema.acquire();
        if (!lstats) {
            // after lock on first run
            lstats = await promises.lstat(from);
        }
        // readdir & lstat do not follow symbolic links
        // if part is a symbolic link, follow it with stat
        let isFile = lstats.isFile();
        let isDirectory = lstats.isDirectory();
        if (lstats.isSymbolicLink()) {
            const stats = await promises.stat(item);
            isFile = stats.isFile();
            isDirectory = stats.isDirectory();
        }
        if (isDirectory) {
            try {
                await promises.mkdir(target, {
                    recursive: true
                });
            } catch (err) {
                // do not throw `folder already exists` errors
                if (isError(err) && err.code !== 'EEXIST') {
                    throw err;
                }
            }
            sema.release();
            const files = await promises.readdir(item, {
                withFileTypes: true
            });
            await Promise.all(files.map((file)=>_copy(path.join(item, file.name), file)));
        } else if (isFile && // before we send the path to filter
        // we remove the base path (from) and replace \ by / (windows)
        filter(item.replace(from, '').replace(/\\/g, '/'))) {
            await promises.copyFile(item, target, overwrite ? undefined : COPYFILE_EXCL).catch((err)=>{
                // if overwrite is false we shouldn't fail on EEXIST
                if (err.code !== 'EEXIST') {
                    throw err;
                }
            });
            sema.release();
        } else {
            sema.release();
        }
    }
    await _copy(from);
}

//# sourceMappingURL=recursive-copy.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit