๐Ÿ•’ Modification Status Guide

July 25, 2025 ยท View on GitHub

Lua API Difficulty Version

๐Ÿš€ 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

FunctionWhat it doesExample
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

Footer