New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fs-ads

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-ads

Node.js module to manipulate NTFS Alternate Data Stream (ADS)

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

fs-ads

Js module to manipulate NTFS Alternate Data Stream (ADS) on windows.

Alternate data streams allow more than one data stream to be associated with a filename (a fork),

using the format filename:streamname (e.g., text.txt:extrastream).

You can store extended attributes by ADS in NTFS on windows as an alternative form of fs-xattr

Installation

npm install --save fs-ads

Usage

const ads = require('fs-ads')

API

ads.get(path, streamName[, options], cb)

Get Alternate Data Stream streamName from file at path.

options is an object that used to set the encoding of ads. The default encoding is utf-8. You can set some custom encoding.

options = { encoding: 'utf-8' } // default
options = { encoding: 'ascii' } // use ascii
options = { encoding: null } // the raw buffer is returned

cb is a callback that will be called with (err, val).

ads.getSync(path, streamName[, options])

Synchronous version of ads.get

ads.set(path, streamName, value[, options], cb)

Set Alternate Data Stream streamName to value on file at path.

value can be either a string or a Buffer.

options is an object that used to set the encoding of ads. The encoding option is ignored if data is a Buffer. It defaults to utf-8.

options = { encoding: 'utf-8' } // default
options = { encoding: 'hex' } // use hex

cb is a callback that will be called with (err).

ads.setSync(path, streamName[, options], value)

Synchronous version of ads.set

ads.remove(path, streamName, cb)

Remove Alternate Data Stream streamName on file at path.

cb is a callback that will be called with (err).

ads.removeSync(path, streamName)

Synchronous version of ads.remove

Keywords

ADS

FAQs

Package last updated on 14 Dec 2017

Did you know?

Socket

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.

Install

Related posts