File modification time: Difference between revisions
Added Kotlin
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: POSIX timestamp from Instant 'mtime') |
(Added Kotlin) |
||
Line 747:
2015-04-13T14:26:26-0500
</pre>
=={{header|Kotlin}}==
<lang scala>// version 1.0.6
import java.io.File
fun main(args: Array<String>) {
val filePath = "input.txt" // or whatever
val file = File(filePath)
with (file) {
println("%tc".format(lastModified()))
// update to current time, say
setLastModified(System.currentTimeMillis())
println("%tc".format(lastModified()))
}
}</lang>
=={{header|Lasso}}==
|