February 21, 2013 Algorithm to determine if a file was modified today | ||||
---|---|---|---|---|
| ||||
Hi, Can someone tell me an algorithm which determines if a file specified by its name was modified today? I suspect that I will need a std.datetime module to work with dates, and something from somewhere that would tell me the modification date and then convert and compare. But std.datetime is quite large... Sorry if this looks like laziness. :-) Thank. |
February 21, 2013 Re: Algorithm to determine if a file was modified today | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lubos Pintes | On Thursday, 21 February 2013 at 12:40:37 UTC, Lubos Pintes wrote: > Hi, > Can someone tell me an algorithm which determines if a file specified by its name was modified today? > I suspect that I will need a std.datetime module to work with dates, and something from somewhere that would tell me the modification date and then convert and compare. > But std.datetime is quite large... Sorry if this looks like laziness. :-) > Thank. http://dlang.org/phobos/std_file.html#timeLastModified and then you should be able to very easily use the methods etc. of http://dlang.org/phobos/std_datetime.html#.SysTime to work out whether it was modified on any particular day. |
Copyright © 1999-2021 by the D Language Foundation