From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Windows file timestamp converted to local time
Date: Tue, 17 Oct 2023 09:25:03 +0200 [thread overview]
Message-ID: <uglcse$2qs30$1@dont-email.me> (raw)
In-Reply-To: <df878937-795d-4c2d-ae75-e250361626a8n@googlegroups.com>
On 2023-10-16 20:35, Matt Borchers wrote:
> Below is the function from System.OS_Lib.
> Does anybody know where the C implementation can be found?
> Does anybody know where the C implementation of "localtime" is found?
>
> function File_Time_Stamp (Name : C_File_Name) return OS_Time is
> function File_Time (Name : Address) return OS_Time;
> pragma Import (C, File_Time, "__gnat_file_time_name");
> begin
> return File_Time (Name);
> end File_Time_Stamp;
If I correctly interpret the description, OS_Time is FILETIME under
Windows, i.e. 64-bit value.
https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
As for implementation it likely calls to GetFileTime after obtaining a
handle to the file.
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfiletime
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
prev parent reply other threads:[~2023-10-17 7:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <262bea8c-57ff-480e-b5aa-da94f0436e98n@googlegroups.com>
2023-10-16 18:35 ` Windows file timestamp converted to local time Matt Borchers
2023-10-16 18:49 ` Niklas Holsti
2023-10-17 2:39 ` Randy Brukardt
2023-10-17 14:13 ` Matt Borchers
2023-10-17 16:28 ` Niklas Holsti
2023-10-17 16:35 ` Simon Wright
2023-10-16 19:14 ` Simon Wright
2023-10-17 7:25 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox