21 lines
603 B
JavaScript
21 lines
603 B
JavaScript
const Fuse = require('fuse-native')
|
|
const Errors = require('../../shared/Errors')
|
|
const Message = require('../../shared/Message')
|
|
const connector = require('../connector')
|
|
|
|
module.exports = exports = function (path, fd, cb) {
|
|
console.log('[RELEASE]')
|
|
connector.send(
|
|
Message.route('fs.release')
|
|
.data({ path, descriptor: fd })
|
|
.expect_response(msg => {
|
|
if ( msg.error() ) {
|
|
return Errors.toCallback(cb, msg.error())
|
|
}
|
|
|
|
console.log('[/RELEASE]')
|
|
return process.nextTick(cb, 0)
|
|
})
|
|
)
|
|
}
|