square/okio

Is there any API to set last modified time for a file?

andrew-k-21-12 opened this issue · 4 comments

Greetings!

Are there any APIs to either copy a file with all attributes (metadata) preserved or modify it for some existing file? I'm mostly interested in handling the last modified time.

If not - is it something planned to be added or it's not prioritized now?

P.S. Forgot to mention - the scope of interest is Common (not JVM, JS, Native separately).

See #1466. Since this presumably only applies to the system file system and not arbitrary file systems it would make sense to be an extension.

Just to make sure I got you correct:

  1. There is no any way to set last modified time for files in okio for common targets now.
  2. There is a plan to support features likes this by using the referenced extensions system which is being designed now.

Is everything right?

Definitely 1. I'm not sure if Jesse plans on supporting this with a built-in extension or whether you'd have to write your own with regard to 2.

I like the idea of offering a couple extensions as a first-party optional artifact.