File modification time: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: POSIX timestamp from Instant 'mtime') |
(Added Kotlin) |
||
Line 747: | Line 747: | ||
2015-04-13T14:26:26-0500 |
2015-04-13T14:26:26-0500 |
||
</pre> |
</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}}== |
=={{header|Lasso}}== |