{ "id": "61972", "key": "TIMOB-1340", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:55:54.000+0000", "created": "2011-04-15T02:49:51.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "createtimestamp", "defect", "ti.modules.titanium.filesystem", "titanium.filesystem.file" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:55:54.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Im trying to get the timestamp of the creation date of a\nFile.
\nBut when im using the Function createTimestamp() im getting the\nerror:

\n

italicType error:Cannot find function createTimestamp\nin object ti.modules.titanium.filesystem\nFileProxy@43ba7e00italic

\n

Im reporting this issue on Android using Titanium SDK 1.3.0 and\nAndroid SDK 2.1.
\nCurrently im only testing it on the SDK/Emulator and not on a real\nphone.

\n

Is something wrong in my code below?

\n
\nvar file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);\n    if ( file.exists() )\n    {\n        timeStampOfFile = file.createTimestamp();\n    }\n
{html}", "attachment": [], "flagged": false, "summary": "Getting the timestamp of a local file - Titanium.Filesystem.File.createTimestamp", "creator": { "name": "marco.schierhorn(atgmail)", "key": "marco.schierhorn(atgmail)", "displayName": "marco.schierhorn (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "marco.schierhorn(atgmail)", "key": "marco.schierhorn(atgmail)", "displayName": "marco.schierhorn (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125384", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

modificationTimestamp was missing as well. Note on Android file\nstored in Resources have no accessible timestamp. These methods may\nonly be used for files written to the device/emulator.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:49:52.000+0000", "updated": "2011-04-15T02:49:52.000+0000" }, { "id": "125385", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [569f3e768e745ac3294308e17550be6bdf312919])\n[#1340 state:resolved] exposed support for\ncreateTimestamp and modificationTimestamp on the File proxy. Note:\nfiles in the Resources folder will not have timestamps when\ncompiled for device. \nhttp://github.com/appcelerator/titanium_mobile/commit/569f3e768e745...

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:49:52.000+0000", "updated": "2011-04-15T02:49:52.000+0000" }, { "id": "125386", "author": { "name": "joemaffia", "key": "joemaffia", "displayName": "Joe Maffia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Just upgraded to 1.4.0 and at least on iPhone this method still\nreturn simply \"1\"

\n

...am I doing something wrong?

{html}", "updateAuthor": { "name": "joemaffia", "key": "joemaffia", "displayName": "Joe Maffia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:49:52.000+0000", "updated": "2011-04-15T02:49:52.000+0000" }, { "id": "125387", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Joe, This is an Android Ticket. Please open up a Q&A or\nHelpDesk item for iPhone. Thanks

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:49:52.000+0000", "updated": "2011-04-15T02:49:52.000+0000" }, { "id": "125388", "author": { "name": "marco.schierhorn(atgmail)", "key": "marco.schierhorn(atgmail)", "displayName": "marco.schierhorn (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Seems to work fine for me now (Android)

{html}", "updateAuthor": { "name": "marco.schierhorn(atgmail)", "key": "marco.schierhorn(atgmail)", "displayName": "marco.schierhorn (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:49:53.000+0000", "updated": "2011-04-15T02:49:53.000+0000" }, { "id": "125389", "author": { "name": "joemaffia", "key": "joemaffia", "displayName": "Joe Maffia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Sorry guys... QA is here \nhttp://developer.appcelerator.com/question/44101/getting-the-timest...\n, I'll open a tkt as well

{html}", "updateAuthor": { "name": "joemaffia", "key": "joemaffia", "displayName": "Joe Maffia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:49:53.000+0000", "updated": "2011-04-15T02:49:53.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }