From: "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca>
Subject: Re: Need to check access and modify time of a file
Date: Thu, 18 Sep 2003 16:39:50 -0400
Date: 2003-09-18T16:39:50-04:00 [thread overview]
Message-ID: <aKoab.7767$BT1.358188@news20.bellglobal.com> (raw)
In-Reply-To: <slrnbmgf28.d8.randhol+abuse@kiuk0152.chembio.ntnu.no>
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
next prev parent reply other threads:[~2003-09-18 20:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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-18 20:39 ` Warren W. Gay VE3WWG [this message]
2003-09-17 10:56 ` Jeffrey Creem
2003-09-17 11:12 ` Preben Randhol
2003-09-18 21:19 ` ARTX Info Bill Sheehan
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox