Updated code example to use proper octal literals. (#120)

Since EcmaScript 6, zero escaped octal literals (like 0777)
are not allowed in strict mode.

I've updated example code for headers in README
to use proper octal literals (like 0o777) for entry mode.
This commit is contained in:
kotborealis 2020-05-27 12:35:25 +03:00 committed by GitHub
parent f639c6ea85
commit eaa31fa709
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ Most of these values can be found by stat'ing a file.
{ {
name: 'path/to/this/entry.txt', name: 'path/to/this/entry.txt',
size: 1314, // entry size. defaults to 0 size: 1314, // entry size. defaults to 0
mode: 0644, // entry mode. defaults to to 0755 for dirs and 0644 otherwise mode: 0o644, // entry mode. defaults to to 0o755 for dirs and 0o644 otherwise
mtime: new Date(), // last modified date for entry. defaults to now. mtime: new Date(), // last modified date for entry. defaults to now.
type: 'file', // type of entry. defaults to file. can be: type: 'file', // type of entry. defaults to file. can be:
// file | link | symlink | directory | block-device // file | link | symlink | directory | block-device