phobos icon indicating copy to clipboard operation
phobos copied to clipboard

Inconsistency with `timeCreated`, `timeLastModified`, `timeLastAccessed` and `timeStatusChanged`

Open 0xEAB opened this issue 11 months ago • 2 comments

std.file currently provides these similar functions:

  • timeCreated
  • timeLastModified
  • timeLastAccessed
  • timeStatusChanged

Some are only available on certain target platforms; that’s fair. Some of them are only available as a method of the DirEntry wrapper (no free-standing function).

But timeLastModified() is really the odd one out as it has two additional overloads that accept “some finite char input range” instead of working on a DirEntry or platform-specific file handle.

Feels a bit inconsistent.

0xEAB avatar Mar 30 '25 04:03 0xEAB

@0xEAB Do you have any suggestions for this ?

DeterminedSage avatar Apr 15 '25 15:04 DeterminedSage

If I had a definitive answer to that, I'd have phrased the issue report differently 🙈 There's a bunch of ways that all seem like a fair solution. But I suppose it would be best to tackle this only after a bit of swarm intelligence brainstorming.

0xEAB avatar Apr 15 '25 23:04 0xEAB