Titanium implementation of node.js's fs module
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.jshintrc
.npmignore
Gruntfile.js
LICENSE
README.md
package.json
support.html
ti-fs.js

README.md

ti-fs

node.js-style fs for Titanium. It can serve as a drop-in replacement for node.js fs for use with browserify.

install npm version

$ npm install ti-fs
$ cp node_modules/ti-fs/ti-fs.js /path/to/project/Resources/

support

ti-fs is officially supported on Titanium SDK 3.4.0+, but likely supports earlier versions.

support chart

  • * see issue #7 for details on lstat and lstatSync
  • ** see issue #6 for details on readlink and readlinkSync
  • *** see issue #5 for details on realpath and realpathSync

assumptions

  • All buffer buffers are assumed to be Ti.Buffer instances, in the absence of a Titanium implementation of the node.js buffer module.
  • All fd file descriptors are assumed to be Ti.Filesystem.FileStream instances.

caveats

  • Titanium streams (in this case Ti.Filesystem.FileStream) do not support the position property, hence position is not supported in any of the following functions: [read, readSync, write, writeSync]
  • The following encodings are not currently supported, though could be if requests are made in the issues: [hex, ucs2, ucs-2, utf16le, utf-16le]

contribute Built with Grunt

  • Run all linting and tests with grunt.
  • Add tests for any new implemented functionality.
  • In lieu of an actual style guide, please follow the existing conventions used in the code.
  • Any interface not part of the node.js fs module will be rejected.
  • If any implementations require specific versions of the Titanium SDK and/or specific mobile platforms, be sure to both handle that condition, and make sure to note it in your pull reuquest.