file

WebJar for file

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

file
Last Version

Last Version

0.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

file
WebJar for file
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

http://github.com/aconbere/node-file-utils

Download file

How to add to project

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

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.

File - Common higher level file and path operations

Install

  npm install file
  var file = require("file");

API

file.walk(start, callback)

Navigates a file tree, calling callback for each directory, passing in (null, dirPath, dirs, files).

file.walkSync(start, callback)

Synchronus version of file.walk, calling callback for each directory, passing in (dirPath, dirs, files).

file.mkdirs(path, mode, callback)

Makes all the directories in a path. (analgous to mkdir -P) For example given a path like "test/this/path" in an empty directory, mkdirs would make the directories "test", "this" and "path".

file.mkdirsSync(path, mode)

Like file.mkdirs but synchronous.

file.path.abspath(path)

Expands ".", "..", "~" and non root paths to their full absolute path. Relative paths default to being children of the current working directory.

file.path.relativePath(root, fullPath)

Given a root path, and a fullPath attempts to diff between the two to give us an acurate path relative to root.

file.path.join(head, tail)

Just like path.join but haves a little more sanely when give a head equal to "". file.path.join("", "tail") returns "tail", path.join("", "tail") returns "/tail"

Versions

Version
0.2.2