It is currently Sat Apr 29, 2017 4:23 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Why nothing like a File.time command?
Unread postPosted: Sun Mar 19, 2017 11:30 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
I cannot find anywhere a mean to get edition time of a file. How can I do? Why is it not into the File commands, along with size and type?

_________________
Alain


Last edited by Sprougnaf on Fri Mar 24, 2017 1:48 am, edited 1 time in total.

Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Sun Mar 19, 2017 11:39 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5487
Location: Paris, France
It exists but we don't have it (yet ;))
See post32859.html#p32859

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Mon Mar 20, 2017 9:02 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
See also:

post35796.html#p35796

Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Thu Mar 23, 2017 3:14 pm 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
@Nicolas
In the post you refer to, Marc says Files in the file system do have timestamps. We don't have a BASIC! command to get at them, but you can use a System command. But I cannot find any; ls -l does not give a time number but an already formatted stamp.

_________________
Alain


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Thu Mar 23, 2017 11:06 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5487
Location: Paris, France
@Sprougnaf
I don't understand your remark about format. You usually tell the time in terms of DD, MM and YYYY, not with a single number? Why would you want a number?

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 1:46 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
What for use I need the time is not only to display it (then, I want to format it myself), I also have to work with it. The more usual is to compare that time with others.

_________________
Alain


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 3:38 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1128
Location: From Blighty
An example from a path on my device via a terminal emulator:-

cd /storage/emulated/0/rfo-basic/source

Then...

ls -l

Lists my BASIC! programs with time and date...

I re-resaved a file and it was appended with the current time and date...

I'm sorry I don't quite understand what you want? What would you like to achieve?  You can easily create a function with that data and parse out unnecessary stuff? With knowing the date and time, you could compare it to the epoch or whatever surely...? Plus or minus a minute!

I don't think in the Android system you can get a creation date though...? Again you'd have to include in your function maybe the epoch as an additional stamp...

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 4:11 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5487
Location: Paris, France
There's also a lib and examples on Julian Dates in the forum (from a long time ago) that allows to make operations on dates.

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 4:33 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
Hallo Sprougnaf,

Sprougnaf wrote:
What for use I need the time is not only to display it (then, I want to format it myself), I also have to work with it. The more usual is to compare that time with others.


Did you try

post35796.html#p35796 :?: ?

In the first lines I announced a FILE.LASTMODIFIED command.
This is a timestamp for the last file modification in Milliseconds.
You know, BASIC! use Java.
Java's File class supports only the last modification.

If you are or not comfortable with it, please give a short feedback and if your judgement is positive, ask Marc for putting this command into the main BASIC! soon.

/Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 6:11 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
I read your post yesterday, Gregor. Glad to see you implementing the function into your Basic, exactly what I need, but that does not help me to work with RFO. Marc read his topic.
Meanwhile I edited my question, replacing "creation/edition" by "edition".

_________________
Alain


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred