Skip to content

GoorLavi/copy-files-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

We are recomending to use copy-files-rev instead of this package.

copy-files-tree

Copy files and folder to destination by tree model

Getting Started

To install package using npm

npm install --save copy-files-tree

Or with yarn

yarn add copy-files-tree

How to use?

Only sync method is provided

const copyFilesTree = require('copy-files-tree');



copyFilesTree(filesTree, 'SourceFolder/','Destination'+'/wantedFolder/');


// Copy folders with one inner folder
const error = copyFilesTree({
    files: [{name: 'image.png'}...],
    folder1: {innerFolder: {files: [{name: 'file.text'}]}},
    folder2: {files: [{name: 'file.txt'}]}
}, 'SourceFolder/','Destination'+'/wantedFolder/');

Result

Destination/wantedFolder/ ------ image.png          
                               |       
                               - folder1/ ------  innerFolder/ ----- file.text         
                               |         
                               - folder2/ ------  file.txt       

More Examples

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Copy files from source to destination by files tree

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published