
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
restful interface to a filesystem
npm start
starts fileserver on port 3000
npm test
runs various file and folder test
app = require('rest-fs')
app is a express application which has all the file system routes defined
the app is not in the listening state
list contents of directory
optional
?recursive = list recursively default false
returns:
[
{
"name" : "file1", // name of dir or file
"path" : "/path/to/file", // path to dir or file
"dir" : false // true if directory
},
...
]
returns contents of file
if dir, redirect to dir path
optional
?encoding = default utf8
returns: content of specified file
creates or overwrites file
creates dir if it does not exist.
renames or moves file if newPath exists
optional
body.newpath = if exist, move/rename file to this location.
body.clobber = if true will overwrite dest files (default false)
body.mkdirp = if true will create path to new location (default false)
body.mode = permissions of file (defaults: file 438(0666) dir 511(0777))
body.encoding = default utf8
returns: modified resource
{
"name" : "file1", // name of dir or file
"path" : "/path/to/file", // path to dir or file
"dir" : false // true if directory
}
creates file
optional
body.mode = permissions of file (438 default 0666 octal)
body.encoding = default utf8
returns: modified resource
{
"name" : "file1", // name of dir or file
"path" : "/path/to/file", // path to dir or file
"dir" : false // true if directory
}
deletes folder
if file returns error
returns:
{}
deletes file
if folder returns error
returns:
{}
FAQs
restful fileserver
The npm package rest-fs receives a total of 12 weekly downloads. As such, rest-fs popularity was classified as not popular.
We found that rest-fs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.