-
-
Save rafayepes/c16a4570c676b6d7f7580401db0b8783 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type copyOpts; | |
[@bs.obj] external makeCopyOpts : (~overwrite: bool=?, ~errorOnExist: bool=?, ~dereference: bool=?, ~preserveTimestamps: bool=?, ~filter: (string=>bool)=?, unit) => copyOpts = ""; | |
/* copySync(src, dest, [options]) */ | |
/* https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy-sync.md */ | |
[@bs.module "fs-extra"] external copySyncExternal : (string, string, copyOpts) => unit = "copySync"; | |
let copySync = (~overwrite=?, ~errorOnExist=?, ~dereference=?, ~preserveTimestamps=?, ~filter:option(string => bool)=?, | |
src: string, dest: string) => | |
copySyncExternal(src, dest, | |
makeCopyOpts(~overwrite?, ~errorOnExist?, ~dereference?, ~preserveTimestamps?, ~filter?, ()) ); | |
copySync("SOURCE", "DESTINATION"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment