martaFile

Method readInfo()

fun File:readInfo(flag: OptionSet<FileInfoField>): Error?, FileInfo?

Suspends

Reads the file information.

Example:

local file = localFileSystem:get("/System/Applications/Calculator.app")
local _, info = file:readInfo("darwin")
if info then
    local verb = info.isApplication and "is" or "is not"
    martax.alert(file.name .. " " .. verb .. " an application.")
end