Rebol3 Code Examplex
File modification time
Get and set the modification time of a file.
Rebol [
title: "Rosetta code: File modification time"
file: %File_modification_time.r3
url: https://rosettacode.org/wiki/File_modification_time
]
;; Get path to the current script:
file: system/options/script
;; Print info:
print [
"^/Current script:" to-local-file file
"^/File size:" size? file
"^/Modified :" modified? file
]
;; Get some info using `query`:
prin "Parial info: "
probe query file [modified created size]
prin "Just values: "
probe query file [:modified :created :size]
;; It is also possoible get info as an object:
print ""
probe query file object!Output:
Current script: C:\Dev\Builder\tree\www\rebol.tech\gen-examples.r3
File size: 2780
Modified : 2-Jun-2026/9:17:49.895+2:00
Parial info: [
modified: 2-Jun-2026/9:17:49.895+2:00
created: 22-May-2026/11:33:12.259+2:00
size: 2780
]
Just values: [2-Jun-2026/9:17:49.895+2:00 22-May-2026/11:33:12.259+2:00 2780]
make object! [
name: %/C/Dev/Builder/tree/www/rebol.tech/gen-examples.r3
size: 2780
type: 'file
date: _
modified: 2-Jun-2026/9:17:49.895+2:00
accessed: 26-Jun-2026/12:45:50.068+2:00
created: 22-May-2026/11:33:12.259+2:00
]