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

@ionic/utils-fs

Package Overview
Dependencies
Maintainers
16
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionic/utils-fs - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

<a name="1.2.0"></a>
# [1.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@1.1.1...@ionic/utils-fs@1.2.0) (2019-03-06)
### Features
* **fs:** add `isExecutableFile` utility ([53d9626](https://github.com/ionic-team/ionic-cli/commit/53d9626))
* **fs:** add `pathReadable`, `pathWritable`, and `pathExecutable` ([5412791](https://github.com/ionic-team/ionic-cli/commit/5412791))
<a name="1.1.1"></a>

@@ -8,0 +20,0 @@ ## [1.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@1.1.0...@ionic/utils-fs@1.1.1) (2019-02-27)

4

dist/index.d.ts

@@ -93,2 +93,6 @@ /// <reference types="node" />

export declare function pathExists(filePath: string): Promise<boolean>;
export declare function pathReadable(filePath: string): Promise<boolean>;
export declare function pathWritable(filePath: string): Promise<boolean>;
export declare function pathExecutable(filePath: string): Promise<boolean>;
export declare function isExecutableFile(filePath: string): Promise<boolean>;
/**

@@ -95,0 +99,0 @@ * Find the base directory based on the path given and a marker file to look for.

@@ -185,2 +185,27 @@ "use strict";

exports.pathExists = pathExists;
function pathReadable(filePath) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return pathAccessible(filePath, fs.constants.R_OK);
});
}
exports.pathReadable = pathReadable;
function pathWritable(filePath) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return pathAccessible(filePath, fs.constants.W_OK);
});
}
exports.pathWritable = pathWritable;
function pathExecutable(filePath) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return pathAccessible(filePath, fs.constants.X_OK);
});
}
exports.pathExecutable = pathExecutable;
function isExecutableFile(filePath) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [stats, executable] = yield Promise.all([safe.stat(filePath), pathExecutable(filePath)]);
return !!stats && (stats.isFile() || stats.isSymbolicLink()) && executable;
});
}
exports.isExecutableFile = isExecutableFile;
/**

@@ -187,0 +212,0 @@ * Find the base directory based on the path given and a marker file to look for.

2

package.json
{
"name": "@ionic/utils-fs",
"version": "1.1.1",
"version": "1.2.0",
"description": "Filesystem utils for Node",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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