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

ffos-fs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ffos-fs - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

50

index.js

@@ -108,2 +108,6 @@ module.exports = new (function() {

{
if (typeof callback !== 'function') {
var callback = function() {};
}
path = path.trim();

@@ -141,2 +145,6 @@ var storage = getStorageForPath(path);

{
if (typeof callback !== 'function') {
var callback = function() {};
}
this.open(path, 'r', function(error, file) {

@@ -149,2 +157,6 @@ callback(null, (error) ? false : true);

{
if (typeof callback !== 'function') {
var callback = function() {};
}
if (!fd) {

@@ -189,2 +201,6 @@ throw new Error('Missing File.');

if (typeof callback !== 'function') {
var callback = function() {};
}
var options = {

@@ -244,2 +260,6 @@ encoding: opts.encoding || null,

{
if (typeof callback !== 'function') {
var callback = function() {};
}
if (!fd) {

@@ -299,2 +319,6 @@ throw new Error('Missing File.');

if (typeof callback !== 'function') {
var callback = function() {};
}
this.exists(filename, function(error, exists) {

@@ -330,2 +354,5 @@ if (error) {

{
if (typeof callback !== 'function') {
var callback = function() {};
}
var storage = getStorageForPath(path);

@@ -357,2 +384,25 @@ if (!storage) {

};
this.unlink = function(path, callback)
{
if (typeof callback !== 'function') {
var callback = function() {};
}
var filepath = getPathWithoutStorageType(path);
var storage = getStorageForPath(path);
if (!storage) {
callback(new Error('Unable to find entry point for ' + path + '.'));
return;
}
var request = storage.delete(filepath);
request.onsuccess = function()
{
callback(null);
};
request.onerror = function()
{
callback(this.error);
};
};
})();

2

package.json
{
"name": "ffos-fs",
"version": "0.0.3",
"version": "0.0.4",
"description": "fs module for the Firefox OS",

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

@@ -60,2 +60,8 @@ ffos-fs

**Remove a file or directory.**
```javascript
fs.unlink(path, callback(error) { ... });
```
----------------------------

@@ -62,0 +68,0 @@

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