package.json
5.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"_args": [
[
{
"raw": "fstream@^1.0.0",
"scope": null,
"escapedName": "fstream",
"name": "fstream",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"/Users/fzy/project/koa2_Sequelize_project/node_modules/node-gyp"
]
],
"_from": "fstream@>=1.0.0 <2.0.0",
"_id": "fstream@1.0.11",
"_inCache": true,
"_location": "/fstream",
"_nodeVersion": "7.7.1",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/fstream-1.0.11.tgz_1488923219641_0.18055859790183604"
},
"_npmUser": {
"name": "zkat",
"email": "kat@sykosomatic.org"
},
"_npmVersion": "4.1.2",
"_phantomChildren": {},
"_requested": {
"raw": "fstream@^1.0.0",
"scope": null,
"escapedName": "fstream",
"name": "fstream",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/node-gyp",
"/tar"
],
"_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
"_shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171",
"_shrinkwrap": null,
"_spec": "fstream@^1.0.0",
"_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/npm/fstream/issues"
},
"dependencies": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
"mkdirp": ">=0.5 0",
"rimraf": "2"
},
"description": "Advanced file system stream things",
"devDependencies": {
"standard": "^4.0.0",
"tap": "^1.2.0"
},
"directories": {},
"dist": {
"shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171",
"tarball": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz"
},
"engines": {
"node": ">=0.6"
},
"gitHead": "1e4527ffe8688d4f5325283d7cf2cf2d61f14c6b",
"homepage": "https://github.com/npm/fstream#readme",
"license": "ISC",
"main": "fstream.js",
"maintainers": [
{
"name": "iarna",
"email": "me@re-becca.org"
},
{
"name": "isaacs",
"email": "isaacs@npmjs.com"
},
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
},
{
"name": "zkat",
"email": "kat@sykosomatic.org"
}
],
"name": "fstream",
"optionalDependencies": {},
"readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/fstream.git"
},
"scripts": {
"test": "standard && tap examples/*.js"
},
"version": "1.0.11"
}