bcle/fuse4js — pull request #1 by sidorares (2012-09-21 23:20:10+00:00)
Title: readlink support

Added realink support.

Example 'qwqwqw' -> '/some/path' link in each directory :

1) return link mode in getattr
```js
function getattr(path, cb) {
if (path.indexOf('qwqwqw') != -1) {
return cb(0, { size: 0, mode: 0120755 });
}
// other files
}
```

2) return target name
```js
function readlink(path, cb) {
cb(0, '/some/path');
}
```

3) add to readdir result

```js
function readdir(path, cb) {
// ...
names.push('qwqwqw');
cb(0, names);
}
```

4) register readlink

```js
// ...
handlers.readlink = readlink;
// ...
f4js.start(options.mountPoint, handlers, options.debugFuse);
```