first commit
This commit is contained in:
15
build/node_modules/chownr/LICENSE
generated
vendored
Normal file
15
build/node_modules/chownr/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
3
build/node_modules/chownr/README.md
generated
vendored
Normal file
3
build/node_modules/chownr/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Like `chown -R`.
|
||||
|
||||
Takes the same arguments as `fs.chown()`
|
||||
52
build/node_modules/chownr/chownr.js
generated
vendored
Normal file
52
build/node_modules/chownr/chownr.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
module.exports = chownr
|
||||
chownr.sync = chownrSync
|
||||
|
||||
var fs = require("fs")
|
||||
, path = require("path")
|
||||
|
||||
function chownr (p, uid, gid, cb) {
|
||||
fs.readdir(p, function (er, children) {
|
||||
// any error other than ENOTDIR means it's not readable, or
|
||||
// doesn't exist. give up.
|
||||
if (er && er.code !== "ENOTDIR") return cb(er)
|
||||
if (er || !children.length) return fs.chown(p, uid, gid, cb)
|
||||
|
||||
var len = children.length
|
||||
, errState = null
|
||||
children.forEach(function (child) {
|
||||
var pathChild = path.resolve(p, child);
|
||||
fs.lstat(pathChild, function(er, stats) {
|
||||
if (er)
|
||||
return cb(er)
|
||||
if (!stats.isSymbolicLink())
|
||||
chownr(pathChild, uid, gid, then)
|
||||
else
|
||||
then()
|
||||
})
|
||||
})
|
||||
function then (er) {
|
||||
if (errState) return
|
||||
if (er) return cb(errState = er)
|
||||
if (-- len === 0) return fs.chown(p, uid, gid, cb)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function chownrSync (p, uid, gid) {
|
||||
var children
|
||||
try {
|
||||
children = fs.readdirSync(p)
|
||||
} catch (er) {
|
||||
if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid)
|
||||
throw er
|
||||
}
|
||||
if (!children.length) return fs.chownSync(p, uid, gid)
|
||||
|
||||
children.forEach(function (child) {
|
||||
var pathChild = path.resolve(p, child)
|
||||
var stats = fs.lstatSync(pathChild)
|
||||
if (!stats.isSymbolicLink())
|
||||
chownrSync(pathChild, uid, gid)
|
||||
})
|
||||
return fs.chownSync(p, uid, gid)
|
||||
}
|
||||
59
build/node_modules/chownr/package.json
generated
vendored
Normal file
59
build/node_modules/chownr/package.json
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"chownr@1.0.1",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "chownr@1.0.1",
|
||||
"_id": "chownr@1.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
|
||||
"_location": "/chownr",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "chownr@1.0.1",
|
||||
"name": "chownr",
|
||||
"escapedName": "chownr",
|
||||
"rawSpec": "1.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/tar-fs"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
|
||||
"_spec": "1.0.1",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/chownr/issues"
|
||||
},
|
||||
"description": "like `chown -R`",
|
||||
"devDependencies": {
|
||||
"mkdirp": "0.3",
|
||||
"rimraf": "",
|
||||
"tap": "^1.2.0"
|
||||
},
|
||||
"files": [
|
||||
"chownr.js"
|
||||
],
|
||||
"homepage": "https://github.com/isaacs/chownr#readme",
|
||||
"license": "ISC",
|
||||
"main": "chownr.js",
|
||||
"name": "chownr",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/chownr.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
||||
Reference in New Issue
Block a user