app

app.app.lsof

Declaration
lua
app.lsof(target)
Description
List open files for a process using proc_pidinfo(PROC_PIDLISTFDS) + proc_pidfdinfo(PROC_PIDFDVNODEPATHINFO).
Parameters
NameTypeRequiredDefaultDescription
targetstring|integerRequired—Bundle ID string or PID number
Return Values
TypeDescription
tableArray of unique file path strings
Example
lua
local files = app.lsof("com.apple.mobilesafari")
for _, f in ipairs(files) do sys.log(f) end
Notes
Uses native proc_pidinfo API (not shell lsof). Deduplicates paths.