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

fs-ext

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-ext - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

21

fs-ext.js

@@ -22,3 +22,5 @@ // Permission is hereby granted, free of charge, to any person obtaining a

var fs = require('fs');
var constants = require('constants');
// populate with fs functions
for (var key in fs) {

@@ -28,2 +30,9 @@ exports[key] = fs[key];

// put constants into constants module (don't like doing this but...)
for (var key in binding) {
if (/^[A-Z_]+$/.test(key)) {
constants[key] = binding[key];
}
}
// Used by flock

@@ -75,1 +84,13 @@ function stringToFlockFlags(flag) {

exports.seek = function(fd, position, whence, callback) {
callback = arguments[arguments.length - 1];
if (typeof(callback) !== 'function') {
callback = noop;
}
binding.seek(fd, position, whence, callback);
}
exports.seekSync = function(fd, position, whence) {
return binding.seek(fd, position, whence);
}

2

package.json

@@ -6,3 +6,3 @@ {

"keywords": ["fs", "filesystem", "flock", "seek"],
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/baudehlo/node-fs-ext/",

@@ -9,0 +9,0 @@ "repository": {

@@ -40,1 +40,14 @@ fs-ext

Synchronous flock(2). Throws an exception on error.
### fs.seek(fd, offset, whence, [callback])
Asynchronous lseek(2). No arguments other than a possible error are passed to
the callback. `whence` can be 0 (SEEK_SET) to set the new position in bytes
to `offset`, 1 (SEEK_CUR) to set the new position to the current position
plus `offset` bytes (can be negative), or 2 (SEEK_END) to set to the end
of the file plus `offset` bytes (usually negative or zero to seek to the end
of the file).
### fs.seekSync(fd, offset, whence)
Synchronous lseek(2). Throws an exception on error.

Sorry, the diff of this file is not supported yet

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