Getting the file date of a txt file

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Getting the file date of a txt file

Post by quailcreek » Sun Jan 10, 2016 11:37 pm

Hi,
I'm using a txt file to populate a datagrid in an iOS app. I would like to do some version control so a newer file will automatically be loaded. My question is, how do I get the date of a txt file or is there a better way to do this that from the date? Thanks for the help.
Last edited by quailcreek on Mon Jan 11, 2016 7:21 am, edited 1 time in total.
Tom
MacBook Pro OS Mojave 10.14

scrabbles
Posts: 25
Joined: Sat Dec 20, 2014 4:32 am

Re: Getting the file date of a txt file

Post by scrabbles » Mon Jan 11, 2016 7:18 am

Hi,

Check out "long" in the dictionary, as it can be used with file commands. e.g.

Code: Select all

set the defaultfolder to "/"
put the detailed files
A checksum or other hash might be more reliable than just timestamp.

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: Getting the file date of a txt file

Post by quailcreek » Tue Jan 12, 2016 12:29 am

Thanks scrabbles. That's not going to work. I think Ill just put the text into flds in a stack and pull the text from there.
Tom
MacBook Pro OS Mojave 10.14

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Getting the file date of a txt file

Post by dave.kilroy » Tue Jan 12, 2016 2:35 am

Hi Tom, try the detailed files and then use the modified date - I use this value in various apps when syncing between local and remote copies is needed...
"...this is not the code you are looking for..."

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: Getting the file date of a txt file

Post by quailcreek » Tue Jan 12, 2016 3:32 am

Thanks again Dave. I'll take a look at that.
Tom
MacBook Pro OS Mojave 10.14

Post Reply