easyfile

WebJar for easyfile

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

easyfile
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

easyfile
WebJar for easyfile
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/yuanyan/easyfile

Download easyfile

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : mkdirp jar [0.5.0,0.6)

Project Modules

There are no modules declared in this project.

easyfile

Super tiny and useful file utils.

Install

npm install easyfile --save

What easyfile do?

  1. Map some sync method as default name:
easyfile.exists = fs.existsSync;
easyfile.chmod = fs.chmodSync;
easyfile.chown = fs.chownSync;
easyfile.append = fs.appendeasyfileSync;
easyfile.stat = fs.statSync;
easyfile.read = fs.readeasyfileSync;
easyfile.readlink = fs.readlinkSync;
easyfile.readdir = fs.readdirSync;
easyfile.rename = fs.renameSync;
easyfile.rmdir = fs.rmdirSync;
easyfile.unlink = fs.unlinkSync;
  1. mkdir is mddirp
easyfile.mkdir('/newpath/newpath/newpath');
  1. copy support file and dir
easyfile.copy('fromfile', 'tofile');
easyfile.copy('fromdir', 'todir');

When copy dir, some file or sub directory not you want could be filter:

easyfile.copy('fromdir', 'todir', {
  // only copy js file
  filter: filepath => path.extname(filepath) === '.js'
})
  1. write could force write and backup
easyfile.write('tofile', data, {
  force: true,
  backup: true
});

Versions

Version
0.1.0