cp

    cp command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.9
    License
    Apache-2.0
    Last updated
    14 hours ago
    Downloads
    218

    #cp

    Copy files and directory trees to new destinations through MoonX.

    #Usage

    moonx cli/cp --no-preserve=mode source.txt new.txt moonx cli/cp --no-preserve=mode -R source-dir new-dir

    Copying requires --no-preserve=mode. Recursive copies check the source tree before creating destinations; explicit skip modes can succeed without copying.

    #Common options

    OptionDescription
    -R, --recursiveCopy directory trees.
    -n, --no-clobberSkip existing targets.
    --update=MODESelect the documented destination update policy.
    -L, --dereferenceSelect source-link traversal.
    -T, --no-target-directoryTreat destination as a complete path.
    --no-preserve VALUERequired for copying to a new destination.
    -v, --verboseShow copied paths.
    --helpShow help.
    --versionShow the version.
    --remove-destinationUnlink an existing POSIX destination before copying a regular source.

    Use --help for the complete option list.

    #Notes

    • With --remove-destination --no-preserve=mode, one regular source can replace a regular destination or symbolic link on POSIX. The destination directory must remain under the caller's control. Existing aliases keep the old file. After unlinking, a source-open failure leaves the destination absent and a copy failure can leave a partial file.
    • A regular source and the same directory entry are rejected. Distinct hard-link entries may be detached. An explicit target-directory symlink is followed unless -T selects the link itself. Interactive, backup and recursive removal profiles are unsupported.
    • Source-link traversal must be selected explicitly where needed. Cycles and destinations inside the source are rejected.

    Build from source with the MoonBit 1.0 RC1 toolchain.

    See the compatibility guide for the supported profile.

    Source Files