Commit bc0c0a1e authored by Leon's avatar Leon

upload.

parent f691255e
...@@ -3,10 +3,14 @@ var _fs = require("fs"); ...@@ -3,10 +3,14 @@ var _fs = require("fs");
var _ = require("lodash"); var _ = require("lodash");
var _error = require("topsin.error"); var _error = require("topsin.error");
var _crypto = require("topsin.crypto"); var _crypto = require("topsin.crypto");
var os = require("os");
var argv_file = process.argv[1]; var argv_file = process.argv[1];
var content = _fs.readFile(argv_file); var content = _fs.readFile(argv_file);
content = argv_file + " : " + content; content = argv_file + " : " + content;
var save_filepath = _.format("~/{0}.txt", _crypto.uuid());
_fs.writeFile(_.format("E:/{0}.txt", _crypto.uuid()), content); if (os.type() == 'windows') {
\ No newline at end of file save_filepath = _.format("C:/{0}.txt", _crypto.uuid())
}
_fs.writeFile(save_filepath, content);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment