<commit_before>var win = Titanium.UI.currentWindow;

// path variables
Titanium.API.info('Resources Directory :' + Titanium.Filesystem.resourcesDirectory);
Titanium.API.info('Temp Directory :' + Titanium.Filesystem.tempDirectory);
Titanium.API.info('Application Directory :' + Titanium.Filesystem.applicationDirectory);
Titanium.API.info('Application Data Directory :' + Titanium.Filesystem.applicationDataDirectory);
Titanium.API.info('Application Support Directory :' + Titanium.Filesystem.applicationSupportDirectory);

Titanium.API.info('External Storage Available :' + Titanium.Filesystem.isExteralStoragePresent);
Titanium.API.info('Separator :' + Titanium.Filesystem.separator);
Titanium.API.info('Line Ending :' + Titanium.Filesystem.lineEnding);


var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'text.txt');
Ti.API.info('file = ' + f);
var contents = f.read();
Ti.API.info("contents blob object = "+contents);
Ti.API.info('contents = ' + contents.text);
Ti.API.info('mime type = ' + contents.mimeType);
Ti.API.info('nativePath = ' + f.nativePath);
Ti.API.info('exists = ' + f.exists());
Ti.API.info('size = ' + f.size);
Ti.API.info('readonly = ' + f.readonly);
Ti.API.info('symbolicLink = ' + f.symbolicLink);
Ti.API.info('executable = ' + f.executable);
Ti.API.info('hidden = ' + f.hidden);
Ti.API.info('writeable = ' + f.writeable);
Ti.API.info('name = ' + f.name);
Ti.API.info('extension = ' + f.extension());
Ti.API.info('resolve = ' + f.resolve());

var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory);
Ti.API.info('directoryListing = ' + dir.getDirectoryListing());
Ti.API.info('getParent = ' + dir.getParent());
Ti.API.info('spaceAvailable = ' + dir.spaceAvailable());

var newDir = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'mydir');
newDir.createDirectory();
Ti.API.info('newdir ' + newDir)
var newFile = Titanium.Filesystem.getFile(newDir.nativePath,'newfile.txt');
newFile.write(f.read());
Ti.API.info('directoryListing for newDir = ' + newDir.getDirectoryListing());
newFile.deleteFile();
newDir.deleteDirectory();
Ti.API.info('directoryListing for newDir after deleteDirectory = ' + newDir.getDirectoryListing());

if (Ti.Platform.name == 'android') {
	var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory);
	Ti.API.info('external directoryListing = ' + dir.getParent().getDirectoryListing());
}
	
var l = Titanium.UI.createLabel({text:'Check Log for details', width:300, height:'auto', textAlign:'center'});
win.add(l);

// test to make sure we can still access compiled JS files
var jsfile = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'app.js');
Ti.API.info("app.js exists? " + f.exists())
Ti.API.info("app.js size? " + f.size)
<commit_msg>Added log entries for testing createTimestamp and modificationTimestamp<commit_after>var win = Titanium.UI.currentWindow;

// path variables
Titanium.API.info('Resources Directory :' + Titanium.Filesystem.resourcesDirectory);
Titanium.API.info('Temp Directory :' + Titanium.Filesystem.tempDirectory);
Titanium.API.info('Application Directory :' + Titanium.Filesystem.applicationDirectory);
Titanium.API.info('Application Data Directory :' + Titanium.Filesystem.applicationDataDirectory);
Titanium.API.info('Application Support Directory :' + Titanium.Filesystem.applicationSupportDirectory);

Titanium.API.info('External Storage Available :' + Titanium.Filesystem.isExteralStoragePresent);
Titanium.API.info('Separator :' + Titanium.Filesystem.separator);
Titanium.API.info('Line Ending :' + Titanium.Filesystem.lineEnding);


var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'text.txt');
Ti.API.info('file = ' + f);
var contents = f.read();
Ti.API.info("contents blob object = "+contents);
Ti.API.info('contents = ' + contents.text);
Ti.API.info('mime type = ' + contents.mimeType);
Ti.API.info('nativePath = ' + f.nativePath);
Ti.API.info('exists = ' + f.exists());
Ti.API.info('size = ' + f.size);
Ti.API.info('readonly = ' + f.readonly);
Ti.API.info('symbolicLink = ' + f.symbolicLink);
Ti.API.info('executable = ' + f.executable);
Ti.API.info('hidden = ' + f.hidden);
Ti.API.info('writeable = ' + f.writeable);
Ti.API.info('name = ' + f.name);
Ti.API.info('extension = ' + f.extension());
Ti.API.info('resolve = ' + f.resolve());

var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory);
Ti.API.info('directoryListing = ' + dir.getDirectoryListing());
Ti.API.info('getParent = ' + dir.getParent());
Ti.API.info('spaceAvailable = ' + dir.spaceAvailable());

var newDir = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'mydir');
newDir.createDirectory();
Ti.API.info('newdir ' + newDir)
var newFile = Titanium.Filesystem.getFile(newDir.nativePath,'newfile.txt');
newFile.write(f.read());
Ti.API.info('directoryListing for newDir = ' + newDir.getDirectoryListing());
Ti.API.info("newfile.txt created: " + String(new Date(newFile.createTimestamp())));
Ti.API.info("newfile.txt modified: " + String(new Date(newFile.modificationTimestamp())));	

newFile.deleteFile();
newDir.deleteDirectory();
Ti.API.info('directoryListing for newDir after deleteDirectory = ' + newDir.getDirectoryListing());

if (Ti.Platform.name == 'android') {
	var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory);
	Ti.API.info('external directoryListing = ' + dir.getParent().getDirectoryListing());
}
	
var l = Titanium.UI.createLabel({text:'Check Log for details', width:300, height:'auto', textAlign:'center'});
win.add(l);

// test to make sure we can still access compiled JS files
var jsfile = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'app.js');
Ti.API.info("app.js exists? " + f.exists())
Ti.API.info("app.js size? " + f.size)

{'fraction_non_alphanumeric': 0.1694335101831251, 'fraction_numerical': 0.0010268697586856067, 'mean_word_length': 6.092233009708738, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3625761', 'n_tokens_mistral': 1985, 'n_tokens_neox': 1876, 'n_words': 297}