Comparing version 1.6.9 to 1.7.0
98
index.js
@@ -23,2 +23,12 @@ const { Readable, Writable, getStreamError } = require('streamx') | ||
S_IRUSR: binding.S_IRUSR || 0, | ||
S_IWUSR: binding.S_IWUSR || 0, | ||
S_IXUSR: binding.S_IXUSR || 0, | ||
S_IRGRP: binding.S_IRGRP || 0, | ||
S_IWGRP: binding.S_IWGRP || 0, | ||
S_IXGRP: binding.S_IXGRP || 0, | ||
S_IROTH: binding.S_IROTH || 0, | ||
S_IWOTH: binding.S_IWOTH || 0, | ||
S_IXOTH: binding.S_IXOTH || 0, | ||
UV_DIRENT_UNKNOWN: binding.UV_DIRENT_UNKNOWN, | ||
@@ -468,2 +478,24 @@ UV_DIRENT_FILE: binding.UV_DIRENT_FILE, | ||
function chmod (path, mode, cb) { | ||
if (typeof path !== 'string') { | ||
throw typeError('ERR_INVALID_ARG_TYPE', 'Path must be a string. Received type ' + (typeof path) + ' (' + path + ')') | ||
} | ||
if (typeof mode === 'string') mode = modeToNumber(mode) | ||
const req = getReq() | ||
req.callback = cb | ||
binding.chmod(req.handle, path, mode) | ||
} | ||
function chmodSync (path, mode) { | ||
if (typeof path !== 'string') { | ||
throw typeError('ERR_INVALID_ARG_TYPE', 'Path must be a string. Received type ' + (typeof path) + ' (' + path + ')') | ||
} | ||
if (typeof mode === 'string') mode = modeToNumber(mode) | ||
binding.chmodSync(path, mode) | ||
} | ||
function mkdirp (path, mode, cb) { | ||
@@ -1077,55 +1109,47 @@ mkdir(path, { mode }, function (err) { | ||
exports.chmod = chmod | ||
exports.close = close | ||
exports.fstat = fstat | ||
exports.ftruncate = ftruncate | ||
exports.lstat = lstat | ||
exports.mkdir = mkdir | ||
exports.open = open | ||
exports.close = close | ||
exports.opendir = opendir | ||
exports.read = read | ||
exports.readFile = readFile | ||
exports.readdir = readdir | ||
exports.readlink = readlink | ||
exports.readv = readv | ||
exports.rename = rename | ||
exports.rmdir = rmdir | ||
exports.stat = stat | ||
exports.unlink = unlink | ||
exports.write = write | ||
exports.writeFile = writeFile | ||
exports.writev = writev | ||
exports.fstat = fstat | ||
exports.ftruncate = ftruncate | ||
exports.chmodSync = chmodSync | ||
exports.closeSync = closeSync | ||
exports.fstatSync = fstatSync | ||
exports.lstatSync = lstatSync | ||
exports.openSync = openSync | ||
exports.closeSync = closeSync | ||
exports.readFileSync = readFileSync | ||
exports.readSync = readSync | ||
exports.statSync = statSync | ||
exports.writeFileSync = writeFileSync | ||
exports.writeSync = writeSync | ||
exports.statSync = statSync | ||
exports.lstatSync = lstatSync | ||
exports.fstatSync = fstatSync | ||
exports.stat = stat | ||
exports.promises.stat = promisify(stat) | ||
exports.lstat = lstat | ||
exports.promises.chmod = promisify(chmod) | ||
exports.promises.lstat = promisify(lstat) | ||
exports.mkdir = mkdir | ||
exports.promises.mkdir = promisify(mkdir) | ||
exports.rmdir = rmdir | ||
exports.promises.opendir = promisify(opendir) | ||
exports.promises.readFile = promisify(readFile) | ||
exports.promises.readdir = promisify(readdir) | ||
exports.promises.readlink = promisify(readlink) | ||
exports.promises.rename = promisify(rename) | ||
exports.promises.rmdir = promisify(rmdir) | ||
exports.unlink = unlink | ||
exports.promises.stat = promisify(stat) | ||
exports.promises.unlink = promisify(unlink) | ||
exports.rename = rename | ||
exports.promises.rename = promisify(rename) | ||
exports.readlink = readlink | ||
exports.promises.readlink = promisify(readlink) | ||
exports.opendir = opendir | ||
exports.promises.opendir = promisify(opendir) | ||
exports.readdir = readdir | ||
exports.promises.readdir = promisify(readdir) | ||
exports.readFile = readFile | ||
exports.promises.readFile = promisify(readFile) | ||
exports.writeFile = writeFile | ||
exports.promises.writeFile = promisify(writeFile) | ||
exports.readFileSync = readFileSync | ||
exports.writeFileSync = writeFileSync | ||
exports.Stats = Stats | ||
@@ -1132,0 +1156,0 @@ |
{ | ||
"name": "bare-fs", | ||
"version": "1.6.9", | ||
"version": "1.7.0", | ||
"description": "Native file system for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -33,2 +33,3 @@ # bare-fs | ||
fs.readdir | ||
fs.chmod | ||
@@ -49,2 +50,3 @@ fs.readFile | ||
fs.promises.writeFile | ||
fs.promises.chmod | ||
@@ -63,2 +65,3 @@ fs.createReadStream | ||
fs.writeFileSync | ||
fs.chmodSync | ||
``` | ||
@@ -65,0 +68,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84236
932
69