Skip to content

Instantly share code, notes, and snippets.

@benbahrenburg
Created March 15, 2015 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benbahrenburg/9adb20ded6e2fe218a11 to your computer and use it in GitHub Desktop.
Save benbahrenburg/9adb20ded6e2fe218a11 to your computer and use it in GitHub Desktop.
TIMOB-17458 - How to test
Steps to verify
1. Create a new ti project
2. Before compiling turn off analytics
3. Apply the PR
4. Run the below app.js
var dir = Ti.Filesystem.getApplicationSupportDirectory();
console.log(dir);
var f = Titanium.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory);
console.log('Directory Exists: '+ (f.exists() ? 'Yes' : 'No'));
console.log('Needs to be yes to pass'));
var testfile = Ti.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory, 'text.txt');
if(testfile.exists()){
testfile.deleteFile();
}
testfile.write("text written via write()\n");
console.log("Check file at:" + testfile.nativePath);
console.log('content needs to be there to pass'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment