filesystem-constants

WebJar for filesystem-constants

License

License

MIT
Categories

Categories

Ant Build Tools
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

filesystem-constants
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

filesystem-constants
WebJar for filesystem-constants
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/andrewosh/filesystem-constants

Download filesystem-constants

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/filesystem-constants/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>filesystem-constants</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/filesystem-constants/
implementation 'org.webjars.npm:filesystem-constants:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/filesystem-constants/
implementation ("org.webjars.npm:filesystem-constants:1.0.0")
'org.webjars.npm:filesystem-constants:jar:1.0.0'
<dependency org="org.webjars.npm" name="filesystem-constants" rev="1.0.0">
  <artifact name="filesystem-constants" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='filesystem-constants', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "filesystem-constants" % "1.0.0"
[org.webjars.npm/filesystem-constants "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

filesystem-constants

Inlined FS constants without the dependency on Node's FS module.

Also provides a few utility functions for converting fs.open flags between OSX and Linux, and for converting between string and integer representations.

Installation

npm i filesystem-constants --save

Usage

constants.linux

FS constants on Linux, copied from fs.constants.

constants.darwin

FS constants on OSX, copied from fs.constants.

constants.parse

Converts flags from their string representation (i.e. 'r') to a flags integer.

const { linux, parse } = require('filesystem-constants')
const flags = parse(linux, 'w+') // 578

constants.translate(from, to, flags)

Translates flags between two platform-specific representations.

const { linux, darwin, translate } = require('filesystem-constants')
translate(darwin, linux, darwin.O_CREATE | darwin.O_APPEND) // 1088 (linux.O_CREATE | linux.O_APPEND)

License

MIT

Versions

Version
1.0.0