fd

File descriptor manager

fd

File descriptor manager for Node.js. Available in npm as fd.

(this example is a bit contrived, something more realistic coming soon)

var fdman = require('fd')()
 
fdman.open('/foo/bar/baz.txt', function (errfd) {
  fdman.checkout('/foo/bar/baz.txt')
  // do something with `fd` 
  fdman.checkin('/foo/bar/baz.txt')
  fdman.close('/foo/bar/baz.txt')
})

fd is Copyright (c) 2012 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.