Sha256: e0356cf0b3682fe8fbce68c268449d6d96a8e9484ea8418f19084ef47dde5a46

Contents?: true

Size: 704 Bytes

Versions: 11

Compression:

Stored size: 704 Bytes

Contents

var fstream = require("../fstream.js")
  , closed = false

fstream
  .Writer({ path: "path/to/symlink"
          , linkpath: "./file"
          , isSymbolicLink: true
          , mode: "0755" // octal strings supported
          })
  .on("close", function () {
    closed = 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((closed?"":"not ")+"ok 3 should be closed")
})

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar-pack/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-pack/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-pack/node_modules/fstream/examples/symlink-write.js
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/fstream/examples/symlink-write.js
embeditor-rails-2.0.0.beta lib/node_modules/npm/node_modules/fstream/examples/symlink-write.js