Vendor Codex and land Phase 1 Epiphany state slice
This commit is contained in:
parent
130e074c69
commit
2042687e30
3959 changed files with 953751 additions and 7 deletions
9
vendor/codex/codex-rs/state/src/paths.rs
vendored
Normal file
9
vendor/codex/codex-rs/state/src/paths.rs
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use std::path::Path;
|
||||
|
||||
pub(crate) async fn file_modified_time_utc(path: &Path) -> Option<DateTime<Utc>> {
|
||||
let modified = tokio::fs::metadata(path).await.ok()?.modified().ok()?;
|
||||
let updated_at: DateTime<Utc> = modified.into();
|
||||
Some(updated_at)
|
||||
}
|
||||
Reference in a new issue