๐ Modification Status Guide
July 25, 2025 ยท View on GitHub
๐ Quick Start Guide for checking file and folder modification times with LuaDoTheWorld
๐ What You'll Learn
- โ How to get the last modification time of a file or folder
- โ How to get the modification time in Unix timestamp format
๐ ๏ธ Prerequisites
- LuaDoTheWorld installed and required in your script
๐๏ธ Get Last Modification Time (Human-Readable)
local dtw = require("luaDoTheWorld/luaDoTheWorld")
local last = dtw.get_entity_last_modification("tests/target/blob.png")
print(last) -- Example output: "2025-07-24 15:30:12"
๐ Get Last Modification Time (Unix Timestamp)
local dtw = require("luaDoTheWorld/luaDoTheWorld")
local last_in_unix = dtw.get_entity_last_modification_in_unix("tests/target/blob.png")
print(last_in_unix) -- Example output: 1750000000
๐ Quick Reference
| Function | What it does | Example |
|---|---|---|
dtw.get_entity_last_modification(path) | Get last modification (readable) | dtw.get_entity_last_modification("file.txt") |
dtw.get_entity_last_modification_in_unix(path) | Get last modification (Unix) | dtw.get_entity_last_modification_in_unix("file.txt") |
๐ Notes
- Works for both files and folders.
- Useful for backups, syncing, or monitoring changes.
๐ Need Help?
- ๐ Check the main SDK documentation
- ๐ Look at other example scripts in the SDK
- ๐ Report issues on our GitHub repository