Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26028] Windows: Add Ti.Filesystem.File parity across platforms

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-05-11T14:53:45.000+0000
Affected Version/sRelease 7.1.1
Fix Version/sRelease 7.3.0
ComponentsWindows
Labelsn/a
ReporterHans Knöchel
AssigneeKota Iguchi
Created2018-05-09T23:04:10.000+0000
Updated2018-06-22T15:50:56.000+0000

Description

Fix some parity issues we're looking at deprecating Ti.Filesystem.File #createTimestamp() and #modificationTimestamp() to be replaced by new #createdAt() and #modifiedAt() methods that return a Date. Basically the timestamp methods return a Date on iOS and Number on the rest. There's not a nice non-breaking way to fix that, so we'd like to deprecate the existing methods and add new variants that return Date on all platforms (since it's pretty easy to turn that into a timestamp if necessary).

Comments

  1. Kota Iguchi 2018-05-10

    https://github.com/appcelerator/titanium_mobile_windows/pull/1235
  2. Samir Mohammed 2018-06-22

    *Closing ticket*, Improvement verified in SDK Version: 7.3.0.v20180618062809.
       Using the following test case:
       var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'app.js');
       
       Ti.API.info('createTimestamp: ' + file.createTimestamp());       // This should show warning message.
       Ti.API.info('modificationTimestamp: ' + file.modificationTimestamp()); // This should show warning message.
       
       var created   = file.createdAt();    // This should return Date value.
       var modified = file.modifiedAt();  // This should return Date value.
       
       Ti.API.info('createdAt: '  + (created instanceof Date)  + ' ' + created);
       Ti.API.info('modifiedAt: ' + (modified instanceof Date) + ' ' + modified);
       
    The following can be seen: + deprecated File.createTimestamp and modificationTimestamp + added createdAt and modifiedAt that returns Date value Information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1235. *Test Environment*
       APPC Studio: 5.0.0.201712081732
       version 7.0.4
       Ws-Local
       Operating System:
       Name = Microsoft Windows 10 Pro
       Version = 10.0.15063
       Architecture = 32bit
       CPUs = 4
       Memory = 16.0GB
       Node.js:
       Node.js Version = 8..9.1
       

JSON Source