Skip to content

Latest commit

Β 

History

History
71 lines (44 loc) Β· 1.93 KB

File metadata and controls

71 lines (44 loc) Β· 1.93 KB

πŸ•’ Modification Status Guide

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

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

Footer