@arcmantle/vite-plugin-copy
    Preparing search index...

    Interface CopyOptions

    interface CopyOptions {
        absolute?: boolean;
        baseNameMatch?: boolean;
        braceExpansion?: boolean;
        caseSensitiveMatch?: boolean;
        concurrency?: number;
        cwd?: string | URL;
        deep?: number;
        dereference?: boolean;
        dot?: boolean;
        encoding?: null | BufferEncoding;
        errorOnExist?: boolean;
        expandDirectories?: ExpandDirectoriesOption;
        extglob?: boolean;
        filter?: CopyFilterSync | CopyFilterAsync;
        flag?: string;
        flatten?: boolean;
        flush?: boolean;
        followSymbolicLinks?: boolean;
        fs?: Partial<FileSystemAdapter>;
        gitignore?: boolean;
        globstar?: boolean;
        ignore?: string[];
        ignoreFiles?: string | readonly string[];
        markDirectories?: boolean;
        mode?: Mode;
        objectMode?: boolean;
        onlyDirectories?: boolean;
        onlyFiles?: boolean;
        overwrite?: boolean;
        preserveTimestamps?: boolean;
        signal?: AbortSignal;
        stats?: boolean;
        suppressErrors?: boolean;
        targets?: readonly Target[];
        throwErrorOnBrokenSymbolicLink?: boolean;
        unique?: boolean;
        verbose?: boolean;
    }

    Hierarchy

    • Options
    • Exclude<WriteFileOptions, BufferEncoding | null>
    • CopyOptions
      • CopyOptions
    Index

    Properties

    absolute?: boolean

    Return the absolute path for entries.

    false
    
    baseNameMatch?: boolean

    If set to true, then patterns without slashes will be matched against the basename of the path if it contains slashes.

    false
    
    braceExpansion?: boolean

    Enables Bash-like brace expansion.

    true
    
    caseSensitiveMatch?: boolean

    Enables a case-sensitive mode for matching files.

    true
    
    concurrency?: number

    Specifies the maximum number of concurrent requests from a reader to read directories.

    os.cpus().length
    
    cwd?: string | URL

    The current working directory in which to search.

    process.cwd()
    
    deep?: number

    Specifies the maximum depth of a read directory relative to the start directory.

    Infinity
    
    dereference?: boolean

    Dereference symlinks.

    false
    
    dot?: boolean

    Allow patterns to match entries that begin with a period (.).

    false
    
    encoding?: null | BufferEncoding
    errorOnExist?: boolean

    When overwrite is false and the destination exists, throw an error.

    false
    
    expandDirectories?: ExpandDirectoriesOption

    If set to true, globby will automatically glob directories for you. If you define an Array it will only glob files that matches the patterns inside the Array. You can also define an Object with files and extensions like in the example below.

    Note that if you set this option to false, you won't get back matched directories unless you set onlyFiles: false.

    true
    
    import {globby} from 'globby';

    const paths = await globby('images', {
    expandDirectories: {
    files: ['cat', 'unicorn', '*.jpg'],
    extensions: ['png']
    }
    });

    console.log(paths);
    //=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg']
    extglob?: boolean

    Enables Bash-like extglob functionality.

    true
    
    filter?: CopyFilterSync | CopyFilterAsync

    Function to filter copied files/directories. Return true to copy the item, false to ignore it. Can also return a Promise that resolves to true or false (or pass in an async function).

    flag?: string
    flatten?: boolean

    Remove the base directory structure of copied files.

    true
    
    flush?: boolean
    followSymbolicLinks?: boolean

    Indicates whether to traverse descendants of symbolic link directories.

    true
    
    fs?: Partial<FileSystemAdapter>

    Custom implementation of methods for working with the file system.

    fs.*
    
    gitignore?: boolean

    Respect ignore patterns in .gitignore files that apply to the globbed files.

    false
    
    globstar?: boolean

    Enables recursively repeats a pattern containing **. If false, ** behaves exactly like *.

    true
    
    ignore?: string[]

    An array of glob patterns to exclude matches. This is an alternative way to use negative patterns.

    []
    
    ignoreFiles?: string | readonly string[]

    Glob patterns to look for ignore files, which are then used to ignore globbed files.

    This is a more generic form of the gitignore option, allowing you to find ignore files with a compatible syntax. For instance, this works with Babel's .babelignore, Prettier's .prettierignore, or ESLint's .eslintignore files.

    undefined
    
    markDirectories?: boolean

    Mark the directory path with the final slash.

    false
    
    mode?: Mode
    objectMode?: boolean

    Returns objects (instead of strings) describing entries.

    false
    
    onlyDirectories?: boolean

    Return only directories.

    false
    
    onlyFiles?: boolean

    Return only files.

    true
    
    overwrite?: boolean

    Overwrite existing file or directory. Note that the copy operation will silently fail if you set this to false and the destination exists. Use the errorOnExist option to change this behavior.

    true
    
    preserveTimestamps?: boolean

    When true, will set last modification and access times to the ones of the original source files. When false, timestamp behavior is OS-dependent.

    false
    
    signal?: AbortSignal

    When provided the corresponding AbortController can be used to cancel an asynchronous action.

    stats?: boolean

    Enables an object mode (objectMode) with an additional stats field.

    false
    
    suppressErrors?: boolean

    By default this package suppress only ENOENT errors. Set to true to suppress any error.

    false
    
    targets?: readonly Target[]

    Array of targets to copy.

    []
    
    throwErrorOnBrokenSymbolicLink?: boolean

    Throw an error when symbolic link is broken if true or safely return lstat call if false.

    false
    
    unique?: boolean

    Ensures that the returned entries are unique.

    true
    
    verbose?: boolean

    Output copied items to console.

    false