Lines Matching full:to
7 copy('/path/to/thing', '/new/path/thing').then(() => {
20 ### copy(from, to, [options]) → Promise
22 Recursively copies `from` to `to` and resolves its promise when finished.
23 If `to` already exists then the promise will be rejected with an `EEXIST`
28 * maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once.
29 * recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a dir…
31 …an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking…
36 * Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
37 * fs - (Default: `require('fs')`) The filesystem module to use. Can be used
38 to use `graceful-fs` or to inject a mock.
40 implementation of `writeStreamAtomic` to use. Used to inject a mock.
41 * getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mo…
45 Ordinarily you'd only call `copy` above. But it's possible to use it's
49 ### copy.file(from, to, options) → Promise
51 Copies an ordinary file `from` to destination `to`. Uses
52 `fs-write-stream-atomic` to ensure that the file is either entirely copied
57 * uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
58 set the user and group of `to`. If uid is present then gid must be too.
59 * mode - (Optional) If set then `to` will have its perms set to `mode`.
60 * fs - (Default: `require('fs')`) The filesystem module to use. Can be used
61 to use `graceful-fs` or to inject a mock.
62 * Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
64 implementation of `writeStreamAtomic` to use. Used to inject a mock.
66 ### copy.symlink(from, to, options) → Promise
68 Copies a symlink `from` to destination `to`. If you're using Windows and
74 * top - The top level the copy is being run from. This is used to determine
77 * fs - (Default: `require('fs')`) The filesystem module to use. Can be used
78 to use `graceful-fs` or to inject a mock.
79 * Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
81 …an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking…
84 ### copy.recurse(from, to, options) → Promise
86 Reads all of the files in directory `from` and adds them to the `queue`
91 … - A [`run-queue`](https://npmjs.com/package/run-queue) object to add files found inside `from` to.
92 * recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a dir…
93 * uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
94 set the user and group of `to`. If uid is present then gid must be too.
95 * mode - (Optional) If set then `to` will have its perms set to `mode`.
96 * fs - (Default: `require('fs')`) The filesystem module to use. Can be used
97 to use `graceful-fs` or to inject a mock.
98 * getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mo…
100 ### copy.item(from, to, options) → Promise
102 Copies some kind of `from` to destination `to`. This looks at the filetype
106 file and directory copies as you can't create a junction on windows to a
111 * top - The top level the copy is being run from. This is used to determine
114 * queue - The [`run-queue`](https://npmjs.com/package/run-queue) object to
115 pass to `copy.recurse` if `from` is a directory.
116 * recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a dir…
117 * uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
118 set the user and group of `to`. If uid is present then gid must be too.
119 * mode - (Optional) If set then `to` will have its perms set to `mode`.
120 * fs - (Default: `require('fs')`) The filesystem module to use. Can be used
121 to use `graceful-fs` or to inject a mock.
122 * getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mo…
124 …an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking…
126 * Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
128 implementation of `writeStreamAtomic` to use. Used to inject a mock.