diff options
| author | John Turner <jturner.usa@gmail.com> | 2026-03-06 19:59:43 -0500 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2026-03-06 19:59:43 -0500 |
| commit | 11cc9a3dd03100f7a3294b806580041be4f425bc (patch) | |
| tree | 617cccabb96eaa48f84cfd8d53675d04744551bb /src/lua.rs | |
| parent | 8ebc635c7e659e3a5fdbde48e4e3f66184230c46 (diff) | |
| download | httpd-11cc9a3dd03100f7a3294b806580041be4f425bc.tar.gz | |
Diffstat (limited to 'src/lua.rs')
| -rw-r--r-- | src/lua.rs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,6 @@ use std::{ ffi::OsString, - os::unix::ffi::OsStringExt, + os::unix::{ffi::OsStringExt, fs::MetadataExt}, path::{Component, Path, PathBuf}, }; @@ -55,6 +55,8 @@ impl UserData for File {} impl UserData for Metadata { fn add_fields<F: mlua::UserDataFields<Self>>(fields: &mut F) { fields.add_field_method_get("len", |_, this| Ok(this.0.len())); + + fields.add_field_method_get("mtime", |_, this| Ok(this.0.mtime_nsec())) } } |
