1.0.6 • Published 7 years ago

copy-document v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Use: Copy a document to other document; Createing by Winux-R ; Email: 464940202@qq.com;

Useing-nodeJS-to-creating-a-cope-function

##Install with npm npm install copy-document

    function copy(src, target, flag){
        fs.readFile(src, "utf8", function (err, data) {
            if (err) {
                console.log(err);
            } else if (data) {
                if(flag === "w"){
                    fs.writeFile(target, data, {flag: flag},  function(err){
                        console.log(err);
                    })
                } else if (flag === "a") {
                    fs.writeFile(target, data, {flag: flag},  function(err){
                        console.log(err);
                    })
                } else {
                    console.log("flag is not right");
                }
            }
        });
    }
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago