May 07, 2018 Re: Windows to Linux Porting - timeCreated and timeLastAccessed | ||||
---|---|---|---|---|
| ||||
Posted in reply to wjoe | On Friday, 4 May 2018 at 15:42:56 UTC, wjoe wrote:
> I think that's not possible. You can't query information that hasn't been stored.
I stand corrected.
As Russel Winder points out there are file systems that store this information and since Linux 4.11 you can query it via statx(2).
|
May 07, 2018 Re: Windows to Linux Porting - timeCreated and timeLastAccessed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vino | On Friday, 4 May 2018 at 11:49:24 UTC, Vino wrote:
> Hi All,
>
> Request your help, I have a D program written on Windows platform and the program is working as expected, now i am trying to port the same program to Linux, my program use the function "timeCreated" from std.file for Windows hugely where as in Linux we do not have the same function hence planned to use the function "timeLastAccessed" from std.file, so what is the best approach to port the program. I tried the below code but not working, so can you one please guide me on the right method to port the program to linux, below is the example code.
I wouldn't use time created. It can be newer than last modified this wholey inacurate. Last accessed could be a much more appopriate choice if trying to determine what is important.
|
May 07, 2018 Re: Windows to Linux Porting - timeCreated and timeLastAccessed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Monday, 7 May 2018 at 14:31:23 UTC, Jesse Phillips wrote:
> I wouldn't use time created. It can be newer than last modified this wholey inacurate. Last accessed could be a much more appopriate choice if trying to determine what is important.
Sorry, to answer your actual question, I do believe that using the OS version specification to select the function is correct.
|
Copyright © 1999-2021 by the D Language Foundation