Sha256: 8a5757135697c62a1703a7e5ee1864f9dafcdf259e20819767999d980fdeaddf

Contents?: true

Size: 745 Bytes

Versions: 115

Compression:

Stored size: 745 Bytes

Contents

var fstream = require('../fstream.js')
var notOpen = false
process.chdir(__dirname)

fstream
  .Writer({
    path: 'path/to/symlink',
    linkpath: './file',
    isSymbolicLink: true,
    mode: '0755' // octal strings supported
  })
  .on('close', function () {
    notOpen = true
    var fs = require('fs')
    var s = fs.lstatSync('path/to/symlink')
    var isSym = s.isSymbolicLink()
    console.log((isSym ? '' : 'not ') + 'ok 1 should be symlink')
    var t = fs.readlinkSync('path/to/symlink')
    var isTarget = t === './file'
    console.log((isTarget ? '' : 'not ') + 'ok 2 should link to ./file')
  })
  .end()

process.on('exit', function () {
  console.log((notOpen ? '' : 'not ') + 'ok 3 should be closed')
  console.log('1..3')
})

Version data entries

115 entries across 112 versions & 20 rubygems

Version Path
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/fstream/examples/symlink-write.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/symlink-write.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/symlink-write.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.22 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.21 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.20 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.19 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.18 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.17 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.16 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.15 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.14 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.13 node_modules/bower/node_modules/fstream/examples/symlink-write.js
trusty-festivity-extension-2.3.12 node_modules/bower/node_modules/fstream/examples/symlink-write.js