Submit
Path:
~
/
/
usr
/
local
/
lib
/
node_modules
/
npm
/
node_modules
/
node-gyp
/
node_modules
/
fstream
/
examples
/
File Content:
symlink-write.js
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') })
Submit
FILE
FOLDER
Name
Size
Permission
Action
filter-pipe.js
3509 bytes
0644
pipe.js
2931 bytes
0644
reader.js
1480 bytes
0644
symlink-write.js
745 bytes
0644
N4ST4R_ID | Naxtarrr