How to use the link function from fs-extra

Find comprehensive JavaScript fs-extra.link code examples handpicked from public code repositorys.

229
230
231
232
233
234
235
236
237
238
- fs.chown():更改由传递的文件名指定的文件的所有者和组。相关阅读:fs.fchown(),fs.lchown()
- fs.close():关闭文件描述符
- fs.copyFile():复制文件
- fs.createReadStream():创建可读的文件流
- fs.createWriteStream():创建可写文件流
- fs.link():创建指向文件的新硬链接
- fs.mkdir(): 新建一个文件夹
- fs.mkdtemp():创建一个临时目录
- fs.open():设置文件模式
- fs.readdir():读取目录的内容
fork icon0
star icon12
watch icon1

+ 13 other calls in file

7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
const mkdir = require('../mkdirs')
const pathExists = require('../path-exists').pathExists


function createLink (srcpath, dstpath, callback) {
  function makeLink (srcpath, dstpath) {
    fs.link(srcpath, dstpath, err => {
      if (err) return callback(err)
      callback(null)
    })
  }
fork icon0
star icon1
watch icon0

+ 17 other calls in file

function icon

fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)