/* Copying and distribution of this file, with or without modification,
 * are permitted in any medium without royalty provided the copyright
 * notice and this notice are preserved.  This file is offered as-is,
 * without any warranty.
 */

import amalthea.fs;

int main(string[] args) {
    string src = args[1];
    string dst = args[2];
    if (src.isRegularFile && (!dst.exists || dst.isRegularFile)) {
        amalthea.fs.copy(src, dst, sync: true, keepMetaData: true);
    } else {
        amalthea.fs.copyRecurse(
            src, dst, No.followLinks, Yes.keepMetaData, No.passErrors
        );
    }
    return 0;
}
