ISO Format Package
2023-5-3 15:0:37 Author: blog.cerbero.io(查看原文) 阅读量:32 收藏

Skip to content

We have released the “ISO Format” package for all licenses of Cerbero Suite Standard and Advanced.

The ISO Format package is exposed to the SDK:

from Pro.Core import *
from Pkg.ISO import *

def parseISO(fname):
    c = createContainerFromFile(fname)
    if c.isNull():
        return
    obj = ISOObject()
    if not obj.Load(c) or not obj.Initialize():
        return
    for dir_name, dir_entries, file_entries in obj.Walk("/"):
        print(dir_name)
        if dir_entries:
            print("    directories:")
            for entry in dir_entries:
                print("       ", str(entry))
        if file_entries:
            print("    files:")
            for entry in file_entries:
                print("       ", str(entry))

An entry can be also retrieved by name:

entry = obj.GetEntry(name)

And its data can be retrieve either by the entry instance or by name:

data = obj.GetEntryData(entry)
# or
data = obj.GetEntryData(name)

文章来源: https://blog.cerbero.io/?p=2673
如有侵权请联系:admin#unsafe.sh