Know the time when a file was created

Discussion and feedback on Construct 2

Post » Thu Jul 27, 2017 11:13 am

Hello.
Is it possible to know when the files were created with NW.js ?, I mean the date / time the files were created.

Image
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Thu Jul 27, 2017 3:01 pm

I believe you can fetch current time and date using the expression Browser.ExecJS("Date()")
B
42
S
23
G
19
Posts: 155
Reputation: 12,977

Post » Thu Jul 27, 2017 3:33 pm

purplemonkey wrote:I believe you can fetch current time and date using the expression Browser.ExecJS("Date()")


Ok, problem solved, thanks.
I needed to know that because my game generates two similar types of data.
1 - The data of the session
2 - the saved game data

When the player saves the game, the session data is now converted to saved game data.
Then I need to prevent the player from manually copying the data from a session and paste it into the saved data folder.
So to fix this, when loading a game I need to verify that the data in the saved game folder was created at the correct time. If the data does not match the time it means that the files are copied by the user.

Any alternative way to do this?
B
29
S
12
G
21
Posts: 801
Reputation: 14,453


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover, Refeuh, technofou and 13 guests