diff --git a/README.md b/README.md index 41a9ea7..8a42c4a 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,9 @@ readdir('/').then((files) => { // ctime: 2017-09-26T05:32:50.874Z, // birthtime: 2017-09-26T05:08:14.000Z, // extend: { - // number: 41453, + // modeNum: 41453, + // modeStr: 'lrwxr-xr-x', // isSymbolicLink: true, - // string: 'lrwxr-xr-x', // owner: { read: true, write: true, execute: true }, // group: { read: true, write: false, execute: true }, // others: { read: true, write: false, execute: true }, @@ -90,9 +90,9 @@ getStat('/var').then((Stats) => { // ctime: 2017-09-26T05:32:50.874Z, // birthtime: 2017-09-26T05:08:14.000Z, // extend: { - // number: 41453, + // modeNum: 41453, + // modeStr: 'lrwxr-xr-x', // isSymbolicLink: true, - // string: 'lrwxr-xr-x', // owner: { read: true, write: true, execute: true }, // group: { read: true, write: false, execute: true }, // others: { read: true, write: false, execute: true }, diff --git a/index.js b/index.js index ab99a32..49337a8 100644 --- a/index.js +++ b/index.js @@ -12,9 +12,9 @@ exports.getStat = async (currentPath, names) => { else { const mode = new Mode(stat); stat.extend = { - number: stat.mode, + modeNum: stat.mode, + modeStr: mode.toString(), isSymbolicLink: mode.isSymbolicLink(), - string: mode.toString(), owner: { ...mode.owner }, group: { ...mode.group }, others: { ...mode.others },