diff options
| author | Saikari <[email protected]> | 2026-01-28 18:49:00 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-01-28 18:49:00 +0300 |
| commit | a258bf46f84f9be20e990db154f5cc9e8fbc4c3e (patch) | |
| tree | 8b80cc1c6d562c3e40e446f08641f81a87d6b95a /xmake/core/sandbox/modules | |
| parent | 9c86aa7667c81d4e492d7418702ae50befdbd38b (diff) | |
Add parse_pe function to check for PE headers and enhance os.isexec for Windows
Diffstat (limited to 'xmake/core/sandbox/modules')
| -rw-r--r-- | xmake/core/sandbox/modules/io.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/io.lua b/xmake/core/sandbox/modules/io.lua index 0cafaa5f2..5657d02b9 100644 --- a/xmake/core/sandbox/modules/io.lua +++ b/xmake/core/sandbox/modules/io.lua @@ -372,6 +372,13 @@ function sandbox_io.tail(filepath, linecount, opt) io.tail(filepath, linecount, opt) end +-- parse pe +function sandbox_io.parse_pe(filepath) + assert(filepath) + filepath = vformat(filepath) + return io.parse_pe(filepath) +end + -- lazy loading stdfile setmetatable(sandbox_io, { __index = function (tbl, key) local val = rawget(tbl, key) |
