Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
File system module for Hexo.
$ npm install hexo-fs --save
const fs = require('hexo-fs');
Some methods in the original fs module are not listed below, but they're available in hexo-fs.
Test whether or not the given path
exists by checking with the file system.
Synchronous version of fs.exists
.
Creates a directory and its parent directories if they does not exist.
Synchronous version of fs.mkdirs
.
Writes data to a file.
Option | Description | Default |
---|---|---|
encoding | File encoding | utf8 |
mode | Mode | 438 (0666 in octal) |
flag | Flag | w |
Synchronous version of fs.writeFile
.
Appends data to a file.
Option | Description | Default |
---|---|---|
encoding | File encoding | utf8 |
mode | Mode | 438 (0666 in octal) |
flag | Flag | w |
Synchronous version of fs.appendFile
.
Copies a file from src
to dest
.
Copies a directory from src
to dest
. It returns an array of copied files.
Option | Description | Default |
---|---|---|
ignoreHidden | Ignore hidden files | true |
ignorePattern | Ignore files which pass the regular expression |
Lists files in a directory.
Option | Description | Default |
---|---|---|
ignoreHidden | Ignore hidden files | true |
ignorePattern | Ignore files which pass the regular expression |
Synchronous version of fs.listDir
.
Reads the entire contents of a file.
Option | Description | Default |
---|---|---|
encoding | File encoding | utf8 |
flag | Flag | r |
escape | Escape UTF BOM and line ending in the content | true |
Synchronous version of fs.readFile
.
Deletes all files in a directory. It returns an array of deleted files.
Option | Description | Default |
---|---|---|
ignoreHidden | Ignore hidden files | true |
ignorePattern | Ignore files which pass the regular expression | |
exclude | Ignore files in the array |
Synchronous version of fs.emptyDir
.
Removes a directory and all files in it.
Synchronous version of fs.rmdir
.
Watches changes of a file or a directory.
See Chokidar API for more info.
Ensures the given path is available to use or appends a number to the path.
Synchronous version of fs.ensurePath
.
Creates the parent directories if they does not exist and returns a writable stream.
Synchronous version of fs.ensureWriteStream
.
MIT
FAQs
File system module for Hexo.
The npm package hexo-fs receives a total of 4,494 weekly downloads. As such, hexo-fs popularity was classified as popular.
We found that hexo-fs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.