Write data to file in Titanium

var configDir = Titanium.Filesystem.getFile( Titanium.Filesystem.applicationDataDirectory, "dirPath" );
       
    if ( configDir.exists() ) {
         configDir.createDirectory();
     }

var config = Titanium.Filesystem.getFile( configDir.resolve(), "fileName" );
       
    if ( config.write( writeSettingToConfig( userID ) ) == false )
    {
        // handle write error
        var error;
    }
    config = null;
    configDir = null;

Comments

Popular posts from this blog

tex2D vs. tex2Dproj

Fast subsurface scattering

Physically-Based Rendering in WebGL