Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

machinepack-fs

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-fs - npm Package Compare versions

Comparing version 2.0.0 to 2.0.2

2

machines/exists.js

@@ -34,3 +34,3 @@ module.exports = {

fsx.exists(Path.resolve(process.cwd(),inputs.path), function(exists) {
if (!exists) {return exits.doesNotExist(err);}
if (!exists) {return exits.doesNotExist();}
return exits.exists();

@@ -37,0 +37,0 @@ });

@@ -5,2 +5,3 @@ module.exports = {

extendedDescription: 'Assumes file is encoded using utf8.',
cacheable: true,

@@ -10,3 +11,3 @@ inputs: {

description: 'Absolute path to the source file (if relative path is provided, will resolve path from current working directory)',
example: '/Users/mikermcneil/.tmp/foo',
example: '/Users/mikermcneil/.tmp/foo.json',
required: true

@@ -13,0 +14,0 @@ },

@@ -5,2 +5,3 @@ module.exports = {

extendedDescription: 'Assumes file is encoded using utf8.',
cacheable: true,

@@ -7,0 +8,0 @@ inputs: {

@@ -5,3 +5,3 @@ module.exports = {

description: 'Completely remove a file or directory (like rm -rf).',
extendedDescription: 'If the provided path is a directory, all contents will be removed recursively.',
extendedDescription: 'If the provided path is a directory, all contents will be removed recursively. If nothing exists at the provided path, the success exit will be triggered, but nothing will be deleted.',

@@ -17,3 +17,2 @@ inputs: {

defaultExit: 'success',
catchallExit: 'error',

@@ -20,0 +19,0 @@ exits: {

module.exports = {
friendlyName: 'Read file as JSON',
description: 'Read JSON file located at source path on disk into a JavaScript object or array.',
friendlyName: 'Write JSON file',
description: 'Write some data to the specified destination path on disk.',
extendedDescription: 'Assumes file is encoded using utf8.',

@@ -8,7 +8,8 @@

json: {
typeclass: 'dictionary',
typeclass: '*',
description: 'The data to write to disk as JSON',
required: true
},
destination: {
example: '/Users/mikermcneil/.tmp/bar',
example: '/Users/mikermcneil/.tmp/bar.json',
description: 'Absolute path to the destination file (if relative path is provided, will resolve path from current working directory)',

@@ -15,0 +16,0 @@ required: true

{
"name": "machinepack-fs",
"version": "2.0.0",
"version": "2.0.2",
"description": "Work with the local filesystem; list files, write files, etc.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -0,6 +1,8 @@

![](http://node-machine.org/images/machine-anthropomorph-for-white-bg.png)
# machinepack-fs
Machines for working with the local filesystem.
Work with the local filesystem; list files, write files, etc.
## Installation
### Installation

@@ -11,20 +13,13 @@ ```sh

## Basic Usage
### Usage
```javascript
var Filesystem = require('machinepack-fs');
For the latest usage documentation and status of this module, see [http://node-machine.org/machinepack-fs](http://node-machine.org/machinepack-fs).
Filesystem.ls({
dir: '/blah/foo/bar'
})
.exec(function (err, result) {
// ...
});
```
### About
For more info about working with machines, see the [node-machine.org](http://node-machine.org).
This is a [machinepack](http://node-machine.org/), a module which exposes a set of related machines according to the [machinepack specification](http://node-machine.org/spec/machinepack).
Documentation pages for the machines contained in this module are automatically generated and kept up-to-date on http://node-machine.org.
### License
## License
MIT © Mike McNeil 2014
MIT © 2015 contributors
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc