Interface CopyOptions

interface CopyOptions {
    dereference?: boolean;
    errorOnExist?: boolean;
    filter?: CopyFilterSync | CopyFilterAsync;
    overwrite?: boolean;
    preserveTimestamps?: boolean;
}

Hierarchy (view full)

Properties

dereference?: boolean

Dereference symlinks.

Default

false
errorOnExist?: boolean

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

Default

false

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).

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.

Default

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.

Default

false

Generated using TypeDoc