P peggjones Active Member Licensed User Longtime User Jul 18, 2014 #1 Anyone got any ideas on the following? I have two copies of a file and want to work out which one is the most recent. I tried using file.lastmodified but this returns only the date not the time. Many thanks.
Anyone got any ideas on the following? I have two copies of a file and want to work out which one is the most recent. I tried using file.lastmodified but this returns only the date not the time. Many thanks.
P positrom2 Active Member Licensed User Longtime User Jul 18, 2014 #2 Yes, me (and others) had wished to find a "Save as" function which would avoid such incidents - but at present I don't see a help for you if the file system does not take care of that parameter. As a work-around I am using Autover http://bean.freeforums.org/autover-2-2-1-t173.html that saves any changed file (selectable) with a time-string. Upvote 0
Yes, me (and others) had wished to find a "Save as" function which would avoid such incidents - but at present I don't see a help for you if the file system does not take care of that parameter. As a work-around I am using Autover http://bean.freeforums.org/autover-2-2-1-t173.html that saves any changed file (selectable) with a time-string.
RandomCoder Well-Known Member Licensed User Longtime User Jul 19, 2014 #3 According to the android developer docs, the last modified time should be available. See here which states that the time will be returned measured in milliseconds since the 1st January 1970. I've also checked using ES File Explorer and that is able to display the modified time. Maybe you need to use a Java Object or the Reflection library to access it? But before doing that have you tried using... Code: Copy DateTime.Time(File.LastModified(File.DirRootExternal, "yourFile.txt")) Kind regards, RandomCoder Upvote 0
According to the android developer docs, the last modified time should be available. See here which states that the time will be returned measured in milliseconds since the 1st January 1970. I've also checked using ES File Explorer and that is able to display the modified time. Maybe you need to use a Java Object or the Reflection library to access it? But before doing that have you tried using... Code: Copy DateTime.Time(File.LastModified(File.DirRootExternal, "yourFile.txt")) Kind regards, RandomCoder