mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-04 21:19:53 +08:00
22 lines
411 B
TypeScript
22 lines
411 B
TypeScript
import mv = require('mv');
|
|
|
|
() => {
|
|
mv('/tmp/f1.txt', '/tmp/f2.txt', error => {
|
|
if (error) {
|
|
throw error;
|
|
}
|
|
});
|
|
|
|
mv('/tmp/f1.txt', '/tmp/f2.txt', {clobber: false}, error => {
|
|
if (error) {
|
|
throw error;
|
|
}
|
|
});
|
|
|
|
mv('/tmp/f1.txt', '/tmp/f2.txt', {mkdirp: true}, error => {
|
|
if (error) {
|
|
throw error;
|
|
}
|
|
});
|
|
};
|