* Re: Need to check access and modify time of a file
2003-09-17 9:09 Need to check access and modify time of a file Preben Randhol
@ 2003-09-17 10:31 ` Larry Kilgallen
2003-09-17 10:49 ` Preben Randhol
2003-09-17 10:56 ` Jeffrey Creem
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Larry Kilgallen @ 2003-09-17 10:31 UTC (permalink / raw)
In article <slrnbmg95g.13n.randhol+abuse@kiuk0152.chembio.ntnu.no>, Preben Randhol <randhol+abuse@pvv.org> writes:
> Hi
>
> I need to make a small application that can check the modification and
> access time of some files. I use GNAT. Does anyboyd have some code doing
> this they want to share. Or if you could point me in the right
> directions. Sorry for asking and not figuring it out myself, but I'm
> very pressed for time.
The very availability of the access time for a file depends on your
operating system.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 10:31 ` Larry Kilgallen
@ 2003-09-17 10:49 ` Preben Randhol
2003-09-18 20:39 ` Warren W. Gay VE3WWG
0 siblings, 1 reply; 11+ messages in thread
From: Preben Randhol @ 2003-09-17 10:49 UTC (permalink / raw)
On 2003-09-17, Larry Kilgallen <Kilgallen@SpamCop.net> wrote:
> In article <slrnbmg95g.13n.randhol+abuse@kiuk0152.chembio.ntnu.no>, Preben Randhol <randhol+abuse@pvv.org> writes:
>> Hi
>>
>> I need to make a small application that can check the modification and
>> access time of some files. I use GNAT. Does anyboyd have some code doing
>> this they want to share. Or if you could point me in the right
>> directions. Sorry for asking and not figuring it out myself, but I'm
>> very pressed for time.
>
> The very availability of the access time for a file depends on your
> operating system.
Linux. It is a Linux only application. I thought that GNAT had a
function to do this, but I don't find it at the moment.
ARG *BONK* I'll check the big book on linux programming, perhaps it has
it.
Preben
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 10:49 ` Preben Randhol
@ 2003-09-18 20:39 ` Warren W. Gay VE3WWG
0 siblings, 0 replies; 11+ messages in thread
From: Warren W. Gay VE3WWG @ 2003-09-18 20:39 UTC (permalink / raw)
Preben Randhol wrote:
> On 2003-09-17, Larry Kilgallen <Kilgallen@SpamCop.net> wrote:
>>In article <slrnbmg95g.13n.randhol+abuse@kiuk0152.chembio.ntnu.no>, Preben Randhol <randhol+abuse@pvv.org> writes:
>>>Hi
>>>
>>>I need to make a small application that can check the modification and
>>>access time of some files. I use GNAT. Does anyboyd have some code doing
>>>this they want to share. Or if you could point me in the right
>>>directions. Sorry for asking and not figuring it out myself, but I'm
>>>very pressed for time.
>>
>>The very availability of the access time for a file depends on your
>>operating system.
>
> Linux. It is a Linux only application. I thought that GNAT had a
> function to do this, but I don't find it at the moment.
Preben, try FLORIST:
with POSIX.File_Status;
with POSIX.Calendar.POSIX_Time;
declare
use POSIX.FIle_Status;
S : Status;
D : POSIX.Calendar.POSIX_Time;
begin
S := Get_File_Status(Pathname); -- Given a pathname
-- S := Get_File_Status(File_Descriptor); -- Given an open file descriptor
D := Last_File_Modification_Of(S);
You'll have to root around in FLORIST to convert this
to a string form of a date, but that will get you
started.
--
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 9:09 Need to check access and modify time of a file Preben Randhol
2003-09-17 10:31 ` Larry Kilgallen
@ 2003-09-17 10:56 ` Jeffrey Creem
2003-09-17 11:12 ` Preben Randhol
2003-09-17 16:39 ` Need to check access and modify time of a file Jean-Pierre Rosen
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Jeffrey Creem @ 2003-09-17 10:56 UTC (permalink / raw)
GNAT.OS_Lib has at a File_Time_Stamp functio but I think it only has one for
modification time.
You probably need to use the POSIX bindings (Florist) to get the access
time.
"Preben Randhol" <randhol+abuse@pvv.org> wrote in message
news:slrnbmg95g.13n.randhol+abuse@kiuk0152.chembio.ntnu.no...
> Hi
>
> I need to make a small application that can check the modification and
> access time of some files. I use GNAT. Does anyboyd have some code doing
> this they want to share. Or if you could point me in the right
> directions. Sorry for asking and not figuring it out myself, but I'm
> very pressed for time.
>
> Thanks in advance.
> Preben
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 10:56 ` Jeffrey Creem
@ 2003-09-17 11:12 ` Preben Randhol
2003-09-18 21:19 ` ARTX Info Bill Sheehan
0 siblings, 1 reply; 11+ messages in thread
From: Preben Randhol @ 2003-09-17 11:12 UTC (permalink / raw)
On 2003-09-17, Jeffrey Creem <jeff@thecreems.com> wrote:
> GNAT.OS_Lib has at a File_Time_Stamp functio but I think it only has
> one for modification time. You probably need to use the POSIX
> bindings (Florist) to get the access time.
I think so too. I guess I can copy the binding of stat() from florist as
it is the only function I need.
Preben
^ permalink raw reply [flat|nested] 11+ messages in thread
* ARTX Info
2003-09-17 11:12 ` Preben Randhol
@ 2003-09-18 21:19 ` Bill Sheehan
0 siblings, 0 replies; 11+ messages in thread
From: Bill Sheehan @ 2003-09-18 21:19 UTC (permalink / raw)
Hello Y'all,
I'm converting really old Ada83 code with calls to ARTX/IFX code from Ready
Systems.
It will become Ada95 with VxWorks calls.
Yes, I know that tasking will be redone.
SC_TDelay would be useful to know about. Also their semaphores would be too.
I would like to know where I could get my hands on manuals or .pdf files.
Anything.
Having stubs to calls isn't that useful. I would like to know what these
calls are doing.
Thanks in advance. I will accept prayers too. :)
BillS
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 9:09 Need to check access and modify time of a file Preben Randhol
2003-09-17 10:31 ` Larry Kilgallen
2003-09-17 10:56 ` Jeffrey Creem
@ 2003-09-17 16:39 ` Jean-Pierre Rosen
2003-09-17 17:54 ` Gautier Write-only
2003-09-18 18:51 ` Pascal Obry
4 siblings, 0 replies; 11+ messages in thread
From: Jean-Pierre Rosen @ 2003-09-17 16:39 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
"Preben Randhol" <randhol+abuse@pvv.org> a �crit dans le message de news:slrnbmg95g.13n.randhol+abuse@kiuk0152.chembio.ntnu.no...
> Hi
>
> I need to make a small application that can check the modification and
> access time of some files. I use GNAT. Does anyboyd have some code doing
> this they want to share. Or if you could point me in the right
> directions. Sorry for asking and not figuring it out myself, but I'm
> very pressed for time.
>
Have a look at OS_Services, available from Adalog's components page (http://www.adalog.fr/compo2.htm)
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 9:09 Need to check access and modify time of a file Preben Randhol
` (2 preceding siblings ...)
2003-09-17 16:39 ` Need to check access and modify time of a file Jean-Pierre Rosen
@ 2003-09-17 17:54 ` Gautier Write-only
2003-09-17 20:07 ` Martin Dowie
2003-09-18 18:51 ` Pascal Obry
4 siblings, 1 reply; 11+ messages in thread
From: Gautier Write-only @ 2003-09-17 17:54 UTC (permalink / raw)
Preben Randhol:
> I need to make a small application that can check the modification and
> access time of some files. I use GNAT. Does anyboyd have some code doing
> this they want to share. Or if you could point me in the right
> directions. Sorry for asking and not figuring it out myself, but I'm
> very pressed for time.
You have it in Martin Dowie's Ada0Y.Directories
http://www.martin.dowie.btinternet.co.uk/
Advantage: will be in the next standard: with an Ada0Y compiler
you'll just have to replace "Ada0Y.Directories" by "Ada.Directories".
________________________________________________________
Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm
NB: For a direct answer, e-mail address on the Web site!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 17:54 ` Gautier Write-only
@ 2003-09-17 20:07 ` Martin Dowie
0 siblings, 0 replies; 11+ messages in thread
From: Martin Dowie @ 2003-09-17 20:07 UTC (permalink / raw)
"Gautier Write-only" <gautier@fakeaddress.nil> wrote in message
news:3F689FCD.B4B0BF7E@fakeaddress.nil...
> You have it in Martin Dowie's Ada0Y.Directories
> http://www.martin.dowie.btinternet.co.uk/
>
> Advantage: will be in the next standard: with an Ada0Y compiler
> you'll just have to replace "Ada0Y.Directories" by "Ada.Directories".
Sadly, not in the Linux flavour Preben requires... but if someone wants to
port me a port!
Also, I need to unload the 'latest' (actually about 2 months old) which
has been sitting on my laptop (it hasn't been speaking to my main PC
via the LAN since returning from abroad - I'll have to dump to disk and
then upload the website).
Cheers,
Martin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need to check access and modify time of a file
2003-09-17 9:09 Need to check access and modify time of a file Preben Randhol
` (3 preceding siblings ...)
2003-09-17 17:54 ` Gautier Write-only
@ 2003-09-18 18:51 ` Pascal Obry
4 siblings, 0 replies; 11+ messages in thread
From: Pascal Obry @ 2003-09-18 18:51 UTC (permalink / raw)
Preben,
> I need to make a small application that can check the modification and
> access time of some files. I use GNAT. Does anyboyd have some code doing
> this they want to share. Or if you could point me in the right
> directions. Sorry for asking and not figuring it out myself, but I'm
> very pressed for time.
This is really OS dependant, have a look at Florist for UNIXes and Win32POSIX
for... well guess :)
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply [flat|nested] 11+ messages in thread